MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Scientific Number Format on Frame

  • To: mathgroup at smc.vnet.net
  • Subject: [mg116665] Re: Scientific Number Format on Frame
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Wed, 23 Feb 2011 05:24:35 -0500 (EST)

Specify all four edges.

data = {{10^-6, 72}, {10^-5, 60}, {10^-4, 45},
   {10^-3, 31}, {10^-2, 33}, {10^-1, 32}};

ListLogLinearPlot[data, Frame -> True,
 FrameTicks -> {
   {Automatic, Automatic},
   {Table[{10^-n,
      ScientificForm[1.*10^(-n),
       NumberFormat -> (10^#3 &)]}, {n, 6}],
    Table[{10^-n, ""}, {n, 6}]}},
 PlotRange -> {0, 100}]

Note that you cannot just use a single Automatic instead of {Automatic, Automatic} for the {left, right} edges. Alternatively, you can use the original (now undocumented) edge specification ordering {bottom, left, top, right}

ListLogLinearPlot[data, Frame -> True,
 FrameTicks -> {
   Table[{10^-n,
     ScientificForm[1.*10^(-n),
      NumberFormat -> (10^#3 &)]},
    {n, 6}],
   Automatic,
   Table[{10^-n, ""}, {n, 6}],
   Automatic},
 PlotRange -> {0, 100}]


Bob Hanlon

---- Luigi B <l.balzano at gmail.com> wrote: 

=============
Dear all,
 I would like to plot my data with the option Frame->True and use a
scientific number format for the x-axis.
This is what I have got:


data = {{10^(-6), 72}, {10^(-5), 60}, {10^(-4), 45}, {10^(-3),
    31}, {10^(-2), 33}, {10^(-1), 32}};

ListLogLinearPlot[data, Frame -> True,
 FrameTicks -> {Table[{10^-n,
     ScientificForm[1.*10^(-n), NumberFormat -> (10^#3 &)]}, {n, 6}],
   Automatic}, PlotRange -> {0, 100}]

However, I would like to have the numbers only on the bottom x-axis. I
cannot do it without messing up the number format.
Any help?

Thanks, L




  • Prev by Date: Re: problem to define a complex variable
  • Next by Date: How to local files on ParallelKernels
  • Previous by thread: Re: Scientific Number Format on Frame
  • Next by thread: Re: Scientific Number Format on Frame