0

I want to add a scale number to the right button of a plot, against the horizontal plotlabel (like 10^-7in the plot below). How should I do that?

enter image description here

New Developer
  • 183
  • 1
  • 10

1 Answers1

1
    TickScale[plotname_, factor_] := 
     Map[Times[#, {1, 
    If[NumberQ[#[[2]]], 1/factor, 1], {1, 1}, {1, 1}}] &, 
    AbsoluteOptions[plotname, Ticks][[1, 2, 1]]]

  f[x_] := 1 - Exp[-x/10^6]
   p1 = Plot[f[x], {x, 1, 10^7}, PlotStyle -> Blue, 
   PlotRange -> {All, {-.1, 1.0}}];
    Show[p1, Ticks -> {TickScale[p1, 10^6], Automatic}, 
   Epilog -> {Text[
   "\[Times] \!\(\*SuperscriptBox[\(10\), \(6\)]\) ", {10.*10^6, \
    -0.185}]}, PlotRangeClipping -> False, 
      ImagePadding -> {{50, 50}, {20, 20}}]

plot

Gopal Verma
  • 1,055
  • 7
  • 11