Ute Perkons | 28 Feb 2012 13:41
Picon

number format; missing ticks/labels

Hi,

I have 2 problems with the following code:

1: I want to change the xticklabels number format to "fixed"  so I can
read in the output "0.001"but I can“t get it work with pgf version
2.10 and pgfplots 1.5.1.

2: I would like to have y ticks and labels for 3. Can I achieve this
without changing the order of the "addplot" commands?

Thanks in advance,
Ute

\documentclass{article}

\usepackage{pgfplots}

\pgfplotsset{compat=newest}

% \pgfkeys{/pgf/number format/.cd,fixed,precision=2}

\pgfplotsset{x tick label style={
    /pgf/number format/fixed zerofill}}% this modifies the `every x
tick label' style

\begin{document}

\begin{tikzpicture}
  \begin{axis}[
(Continue reading)

Christian Feuersaenger | 28 Feb 2012 19:19

Re: number format; missing ticks/labels

Hi,

1. : the option list

\pgfplotsset{x tick label style={
         scaled ticks=false,
         /pgf/number format/fixed zerofill,
         /pgf/number format/fixed,
         /pgf/number format/precision=3,
     }
}

seems to do what you want: 'scaled ticks' disable the extra tick scaling 
label on the bottom right, and the remaining keys configure the output.

2. ytick = data  chooses only yticks for which y coordinates exist.
If you add 'extra y ticks=3' , you also get a further y tick label at 3.

Alternatively, you can provide a full list 'ytick={1,2,3}'.

Best regards

Christian

Am 28.02.2012 13:41, schrieb Ute Perkons:
> Hi,
>
> I have 2 problems with the following code:
>
> 1: I want to change the xticklabels number format to "fixed"  so I can
(Continue reading)


Gmane