Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #7576 > unrolled thread

Frameticks and ListLogLinearPlot

Started byLuigi B <l.balzano@gmail.com>
First post2012-01-04 10:09 +0000
Last post2012-01-05 11:03 +0000
Articles 2 — 2 participants

Back to article view | Back to comp.soft-sys.math.mathematica


Contents

  Frameticks and ListLogLinearPlot Luigi B <l.balzano@gmail.com> - 2012-01-04 10:09 +0000
    Re: Frameticks and ListLogLinearPlot Szabolcs Horvát <szhorvat@gmail.com> - 2012-01-05 11:03 +0000

#7576 — Frameticks and ListLogLinearPlot

FromLuigi B <l.balzano@gmail.com>
Date2012-01-04 10:09 +0000
SubjectFrameticks and ListLogLinearPlot
Message-ID<je18hn$3eo$1@smc.vnet.net>
Dear all,
 I have the problem of adding ticks to a ListLogLinearPlot.
I use the code:

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,
-1,6}],
    Automatic, Automatic, None}, PlotRange ->  {0, 100}]


this works well as long as the mantissa of the tick is different than
0. However, when this happens it does not work any more.

Could you pls help me out? Or suggest another code to do the same?

Thanks, Luigi

[toc] | [next] | [standalone]


#7593

FromSzabolcs Horvát <szhorvat@gmail.com>
Date2012-01-05 11:03 +0000
Message-ID<je401d$eff$1@smc.vnet.net>
In reply to#7576
On 2012.01.04. 11:09, Luigi B wrote:
> Dear all,
>   I have the problem of adding ticks to a ListLogLinearPlot.
> I use the code:
>
> 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,
> -1,6}],
>      Automatic, Automatic, None}, PlotRange ->   {0, 100}]
>
>
> this works well as long as the mantissa of the tick is different than
> 0. However, when this happens it does not work any more.
>
> Could you pls help me out? Or suggest another code to do the same?
>

Hi Luigi,

To show 10^0 verbatim, a workaround is using Superscript[]

Table[{10^-n, Superscript[10, -n]}, {n, -1, 6}]

Please see several alternative solutions here:

http://stackoverflow.com/questions/7860400/exponential-form-of-tick-marks-for-log-plot-in-mathematica

-- 
Szabolcs Horvát
Mma QA site proposal: http://area51.stackexchange.com/proposals/37304

[toc] | [prev] | [standalone]


Back to top | Article view | comp.soft-sys.math.mathematica


csiph-web