I have the following plots in Mathematica but I would like to plot them with respect to Sqrt[s] instead of s. How would I do that?

p1 = Plot[{Abs[
 Subscript[f, 1][s]/(s - (Subscript[σ, 1][s])^2)]/191.36, 
 Abs[Subscript[f, 5][s]/(s - (Subscript[σ, 5][s])^2)]/38, 
 Abs[Subscript[f, 50][s]/(s - (Subscript[σ, 50][s])^2)]/4, 
 Abs[Subscript[f, 100][s]/(s - (Subscript[σ, 100][s])^2)]/
2.48878}, {s, 3.5, 5.0}, PlotLegends -> {"0.1", "0.5", "5", "10"},
PlotLabel -> 
"\!\(\*SubscriptBox[\(P\), \(1\)]\) amplitudes: M=2.1, \
 \!\(\*SubscriptBox[\(m\), \(1\)]\)=\!\(\*SubscriptBox[\(m\), \
 \(2\)]\)=1", PlotRange -> All, 
 AxesLabel -> {"E", "|\!\(\*SubscriptBox[\(P\), \(1\)]\)|"}, 
 ImageSize -> Large]
  • 2
    It is good practice to present a minimal example, rather than just cutting and pasting the code you are working on. You are more likely to get a helpful response if you do. – mikado Aug 10 at 20:22
  • Welcome to Mathematica.SE! I suggest the following: 1) As you receive help, try to give it too, by answering questions in your area of expertise. 2) Take the tour! 3) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! – Michael E2 2 days ago

You can use ScalingFunctions (although sometimes it messes up the ticks):

Plot[Sin[Pi s], {s, 1, 8}, PlotRange -> All, 
 ScalingFunctions -> {{Sqrt, #^2 &}, Automatic}]

Mathematica graphics

The ticks seem to be log-scale choices. Here's a way around that if desired:

Plot[Sin[Pi s], {s, 0, 8}, PlotRange -> All, 
 ScalingFunctions -> {{Sqrt, #^2 &}, Automatic}, 
 Ticks -> {Charting`ScaledTicks["Linear", {Sqrt, #^2 &}, "Nice"], Automatic}]

You can use Block to effect a change of plot variable e.g.

Block[{s = sqrts^2},
 Plot[Sinc[Pi s], {sqrts, -5, 5}, PlotRange -> All]]

Your Answer


By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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