x = ComplexExpand[(ωm^2 - ω^2 - I*ω*γm - (G^2*δ*ωm)/((k - I*ω)^2 + δ^2))]

k = 0.2
δ = 10
G = 0.3
γm = 0.000001
ωm = 10`

Plot[(Abs[(Re[x] + ω^2)^(1/2)]/ωm), (ω, -20,20},
  AxesLabel  -> (HoldForm[ω/ωm], HoldForm[ωeff1/ωm]),
  LabelStyle -> (GrayLevel[0], Bold),
  PlotStyle  -> (Thick, Green),
  PlotRange  -> All]

I want to scale on both axis with $\omega_{m}$ y axis is scaled but not x-axis. While scaling with $\{\omega/\omega_{m}, -10,10\}$ in the above plot for x-axis, it shows some iteration error.

I tried with $\Omega$= Range[-10,10]; t = $\Omega/\Omega_{m}$ and it shows strange behavior along y-axis.

How can I scale x-axis with $\Omega/\Omega_{m}$?

  • 1
    $\begingroup$ You cannot use List brackets (curly braces) as if they were parentheses. See The Four Kinds of Bracketing in the Wolfram Language. You have not provided a definition for the parameter a $\endgroup$
    – Bob Hanlon
    Commented Nov 5, 2019 at 21:16
  • $\begingroup$ Depending on how you want to scale the x-axis, you need to do one of the following: Scale the limits of $\Omega$: {Ω,-10Ωm, 10Ωm}. Replace Ω with Ω/Ωm during the computation of your function - the easiest is probably to use Block[{Ω=Ω/Ωm}, Abs[...]] $\endgroup$
    – Lukas Lang
    Commented Nov 5, 2019 at 21:16
  • $\begingroup$ @Bob I removed those braces and 'a' was a typo there $\endgroup$
    – Phyzy
    Commented Nov 5, 2019 at 22:22
  • $\begingroup$ @Lukas thanks, scaling while computation worked for me rather than in plotting. $\endgroup$
    – Phyzy
    Commented Nov 5, 2019 at 22:42

1 Answer 1

Plot[(Abs[(Re[x] + ω^2)^(1/2)] /. ω -> ω1 ωm)/ωm,
 {ω1, -20/ωm, 20/ωm}, 
 AxesLabel -> {HoldForm[ω/ωm], HoldForm[ωeff1/ωm]}, 
 LabelStyle -> {GrayLevel[0], Bold}, PlotStyle -> {Thick, Green}, 
 PlotRange -> All]

enter image description here

  • $\begingroup$ @ Alx Scaling along x-axis is fine but now, not scaled with \{omega_{m}} along y-axis. $\endgroup$
    – Phyzy
    Commented Nov 6, 2019 at 9:15
  • $\begingroup$ Just divide to ωm. $\endgroup$
    – Alx
    Commented Nov 6, 2019 at 12:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.