Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

I've noted a strange behavior of PGFplots y label with the following code:

\documentclass{report}
\usepackage{pgfplots}

\begin{document}
\begin{tikzpicture}
\begin{axis}[
compat = 1.3,
no markers,
grid   = major,
ylabel = $P_2$,
xlabel = h,
xmin   = 0,
xmax   = 60000,
% TRY HERE
% case 1      
ymin   = 0,
% case 2
%ymin   = 0.00000001,
]
\addplot[line width=1.5pt,red] table[x index=0,y index=1]{
  1.0000000e+003  2.7793697e-004
  5.5000000e+004  6.3359750e-007
};
\end{axis}
\end{tikzpicture}

\end{document}

Compile with case 1 not commented and with case 2 commented and after viceversa to see the difference.

the two results

Can somebody tell me why?

Is it a bug?

share|improve this question
    
I don't see any difference. Perhaps your pgfplots is outdated? –  romeovs Feb 1 '11 at 22:58
    
@romeovs. With the packages currently in TL2010 there is a difference (at least on my system). See the image above. –  Caramdir Feb 1 '11 at 23:28
    
I have the same problem. I can reproduce the 2 cases above. scaled y ticks=false/true does not have any effect on the way the axis is shown when ymin = 0. It only works for ymin = .0000001. –  user7510 Aug 29 '11 at 11:50
    
@Matt: Welcome to TeX.sx! Your question won't be seen by many people here so it would be best to repost it as a fresh question. Follow-up questions like this are more than welcome! Please use the "Ask Question" link for your new question; there you can link to this question to provide the background. –  lockstep Aug 29 '11 at 11:59
add comment

1 Answer 1

up vote 2 down vote accepted

It is a bit hard to predict when the tick numbers are formatted with a common scaling factor (as on the x axis in both cases, and the y axis only in the second case), and when they are formatted in normal scientific notation (y axis in the first case), but you can control the behaviour with the axis option scaled y ticks=false (or true, depending on what you prefer).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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