0

I am working with pgfplots and I want a constant number of decimal places on ticks. A similiar question was answered here pgfplot with constant decimal places on ticks

\usetikzlibrary{shapes,arrows}
\usepackage{pgfplots,pgfplotstable,tikz}
\usepgfplotslibrary{external}
\usetikzlibrary{pgfplots.external}
\usepackage{graphicx}
\usepackage{epstopdf}

\usetikzlibrary{spy} \tikzset{mark size=3}

\begin{document}

\pgfplotsset{ tick label style={font=\Large,color=black}, label style={font=\Large,color=black}, legend style={font=\Large},yticklabel style={/pgf/number format/fixed,/pgf/number format/precision=3}} \pgfplotsset{every axis/.append style={ thick,tick style={ thick},color=black}} \pgfplotsset{/pgfplots/error bars/error bar style={ thick}}

\pgfplotsset{/pgfplots/every axis x label/.append style={font=\Large,anchor=north}} \pgfplotsset{/pgfplots/every axis y label/.append style={font=\Large,anchor=near ticklabel}}

\begin{tikzpicture} \begin{axis}[y tick label style={/pgf/number format/.cd,fixed,fixed zerofill,precision=2,/tikz/.cd}, scaled ticks=false,xlabel={$x$},ylabel=$y$,xmin=0,xmax=1, y label style={at={(axis description cs:-0.05,0.5)}}]

\addplot+[error bars/.cd,y dir=both,y explicit,] [only marks,mark=o,black] table [x=x,y=y] {Daten.txt}; \addplot [dotted,black] table [x=x_Daten_Linie,y=y_Daten] {Daten.txt};

\end{axis} \end{tikzpicture}

\end{document}

My question is: How can I apply this, Except the 0 ? i.e. I don't want 0.00 when I got 2 decimal places. Just "0".

enter image description here

Thank you :)

HansR
  • 21

0 Answers0