# Plotting with small variations along the vertical axis

I can't see the small changes of my function when I plot it. What can I do?

r = 4.5;
h = 55;
rho = 10^16;
vol = Pi r*r*h;
n = vol*rho;
ω0 = 508.8*10^12;
γ = 61.54*10^6;
ℏ = 1.054571596*10^-34;(*J s*)
c = 2.99792458*10^9;(*m/s*)

e = 1.60217646263*10^-19;(*C*)
μ0 = 4 Pi*10^-7; (* N/A^2 *)
ϵ0 = (μ0*(c^2))^-1;
μ = 2.9883*10^-29;
u = 3*10 - 3;
ξ = (2 u/ϵ0)^(1/2);
Ω = μ ξ/ℏ; (*Rabi fr^equency*)

W = (2 (Ω^2))/(γ^2);
cte = (2 n (μ^2))/(ξ ℏ γ);

g3[ω_] := cte/(1 + ((4 ((ω - ω0)^2)/γ^2)) + (W));

n3[ω_] := 1 - ((2 (ω - ω0)/γ) g3[ω]);

p5 = Plot[g3[ω], {ω, 3.9*10^14, 6*10^14}, PlotRange -> All]
p6 =
Plot[n3[ω], {ω, 3.9*10^14, 6*10^14},
PlotRange -> {{4.7*10^14, 5.4*10^14}, {.9999999, 1.0000001}}]


The problem is with plot p6, in which the variations are very small and the vertical axis doesn't let me see smaller variations than plot p5 (2.*10^-29)

Substract -1 from the n3.

n3[\[Omega]_] := -((2 (\[Omega] - \[Omega]0)/\[Gamma]) g3[\[Omega]]);

p5 = Plot[g3[\[Omega]], {\[Omega], 3.9*10^14, 6*10^14},
PlotRange -> All, Mesh -> All, PlotPoints -> 300]
p6 = Plot[n3[\[Omega]], {\[Omega], 4.7*10^14, 5.4*10^14}, Mesh -> All,
PlotPoints -> 300,
Ticks -> {Automatic, {{-10^-24,
"1-\!$$\*SuperscriptBox[\(10$$, $$-24$$]\)"}, {0, "1"}, {10^-24,
"1+\!$$\*SuperscriptBox[\(10$$, $$-24$$]\)"}}}]  • Thank you very much! – Avv Mar 16 '18 at 17:37

This answer shows you how to fake a plot of n3 by plotting

m[ω_] := -(2 (ω - ω0)/γ) g3[ω]


which is n3[ω] - 1 but plots nicely about x-axis without having machine arithmetic problems. Then it is only necessary to relabel the y-axus so that the plot reads as if it were a plot of n3.

xticks = Table[{i, i/1*^14}, {i, Subdivide[4.8*^14, 5.4*^14, 6]}];
yticks =
{{-1.*10^-24, HoldForm[1 - 1.*^-24]},
{-5.*10^-25, HoldForm[1 - 5.*^-25]},
{5.*10^-25, HoldForm[1 + 5.*^-25]},
{1.*10^-24, HoldForm[1 + 1.*^-24]}};

p6 =
Plot[m[ω], {ω, 4.7*10^14, 5.4*10^14},
PlotPoints -> 75,
PlotRange -> {Automatic, {-1.25*10^-24, 1.25*10^-24}},
AxesLabel -> {Row[{"×", HoldForm[10^14]}], ""},
Ticks -> {xticks, yticks},
PlotRangeClipping -> False,
Epilog -> {Text[1., {4.7*^14, 0}, {3, 0}]}] • Thanks for the help. I have a question, the numbers 4.8*^14, 5.4*^14, etc. are missing the number 10? Because M11 marks an error and you write many numbers without the 10 and I don't know what that means – Avv Mar 16 '18 at 17:08
• @ÁulideMartínezTapia. Did you notice the multiplier at the end of the ω-axis. It is to remind the viewer that the ω-axis values are to be multiplied by 10^4. I did it that way because, with the multiplier shown for each displayed number, the ω-axis labeling gets too crowded. If you prefer, the labeling can be changed. Perhaps you would find ω/10^4 clearer. – m_goldberg Mar 16 '18 at 17:35

In M11+, you can add PrintPrecision to the BaseStyle:

Plot[
n3[ω],
{ω],3.9*10^14,6*10^14},
PlotRange->{{4.7*10^14,5.4*10^14},{.9999999,1.0000001}},
BaseStyle->{PrintPrecision->10}
] • It doesn't work for precision> 15 and i need more than that – Avv Mar 16 '18 at 5:42