3
$\begingroup$

Consider specific example of plotting generated data:

f[x_, y_] = 10^11*y^2*(Exp[-100 y^2/x^6] - Exp[-140 y^2/x^6]);
plot = RegionPlot[f[x, 10^(y/2)] >= 1, {x, 0.1, 10}, {y, -7, 1}]
plotdata = {#[[1]], 10^#[[2]]} & /@ 
   Partition[Flatten[Cases[Normal@plot, Line[x_] :> x, Infinity]], 2];
ListLogLinearPlot[plotdata, PlotRange -> {{0.1, 10}, {10^-7, 10^-5}}, 
 Ticks -> {Automatic, {N[10^-7], N[5*10^-7], N[10^-6], N[5*10^-6], 
    N[7*10^-6], N[10^-5]}}]

All the numbers for the y labels are displayed as I want - $5\cdot 10^{-6}$, $7\cdot 10^{-6}$, all the numbers after $10^{-5}$ are displayed in the form 0.000x. How to force them to displayed as $x\cdot 10^{-5}$?

$\endgroup$
1
  • $\begingroup$ Try to wrap with ScientificForm. $\endgroup$ Aug 28, 2018 at 15:45

1 Answer 1

3
$\begingroup$

Using NumberForm with ExponentFunction option setting (# &) seems to work:

 Ticks -> {Automatic, {#, NumberForm[#, ExponentFunction -> (# &)]} & /@
   {N[10^-7], N[5*10^-7], N[10^-6], N[5*10^-6], N[7*10^-6], N[10^-5]}}

gives

enter image description here

$\endgroup$

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