Message Boards Message Boards

2 Replies
7 Total Likes
View groups...
Share this post:

Can we have all frame ticks in scientific format in *Plot ?

Posted 12 years ago
When I plot, for example, the following: 

LogLogPlot[x^5, {x, 10^-6, 10^6}, Filling -> Bottom]

Some frame ticks are displayed in scientific format and others in decimal form. Is there a way to have all frame ticks displayed with scientific notation? I ended up using something like this: 

xticks = Table[{10^i, DisplayForm@SuperscriptBox[10, i]}, {i, -6, 6, 2}];
yticks = Table[{10^i, DisplayForm@SuperscriptBox[10, i]}, {i, -30, 30, 5}];
LogLogPlot[x^5, {x, 10^-6, 10^6}, Ticks -> {xticks, yticks}, Filling -> Bottom]

The thing is, I am satisfied with the tick values computed by Mathematica, but it seems that I'd have to specify these values in order to also dictate how they are displayed. 
POSTED BY: Ken Hsieh
2 Replies
Posted 4 years ago

how to vary the tick length

POSTED BY: banny Ma
LogLogPlot includes explicit ticks in the result, so we can extract them and adjust the labels to our liking:
llp = LogLogPlot[x^5, {x, 10^-6, 10^6},Filling->Bottom];
ticks = Map[
   If[MatchQ[#, {_, _}], {First[#], Superscript[10, Round@Log10[E^First[#]]]}, #] &,
   Ticks /. Options[llp, Ticks], {2}];
Show[llp, Ticks -> ticks]

POSTED BY: Brett Champion
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract