0

As suggested by similar topics on this site, I followed the procedure to write the x labels in decimal form. However, they continue to appear in scientific form. These are decimal numbers of the order of 10 ^ -3: perhaps it is a pgfplots limit?

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{amsmath,amssymb,amsfonts,systeme,mathtools} 
\usepackage{chemfig}
\usepackage[version=3]{mhchem}
\usepackage{pgfplots}

\begin{document}

\begin{figure}
\centering
\begin{tikzpicture}
  \begin{axis}[
  legend pos=outer north east,
  legend cell align={left},
  grid, grid style=dashed,
  ymin=1.50,ymax=2.75,
  ytick={1.50,1.60,1.70,1.80,1.90,2.00,2.10,2.20,2.30,2.40,2.50,2.60},
  xtick={0.0030,0.0031,0.0032,0.0033,0.0034}, 
  xmax=0.0035,xmin=0.0030,
  axis lines = middle,
  set layers,                   % <---  
  x tick label style={
        /pgf/number format/.cd,
            fixed relative,
            precision=5,
        /tikz/.cd,
        rotate=90
    }
  ]
  \addplot[color=orange,mark=*,mark options={solid,draw=orange,fill=orange},smooth]
    coordinates {
    (0.00341,2.67)(0.00335,2.44)(0.00330,2.24)(0.00324,2.06)(0.00319,1.88)(0.00314,1.72)(0.00309,1.56)
    };
    \addlegendentry{$x_1 = 0.3$};
  \end{axis}
\end{tikzpicture}
\end{figure}

\end{document}

enter image description here

0

Fixed

\documentclass{article}
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{amsmath,amssymb,amsfonts,systeme,mathtools} 
\usepackage{chemfig}
\usepackage[version=3]{mhchem}
\usepackage{pgfplots}

\begin{document}

\begin{tikzpicture}
  \begin{axis}[
  legend pos=outer north east,
  legend cell align={left},
  grid, grid style=dashed,
  ymin=1.50,ymax=2.75,
  ytick={1.50,1.60,1.70,1.80,1.90,2.00,2.10,2.20,2.30,2.40,2.50,2.60},
  xtick={0.0030,0.0031,0.0032,0.0033,0.0034}, 
  xmax=0.0035,xmin=0.0030,
  axis lines = middle,
  set layers,                      
  x tick label style={ %right code here
        /pgf/number format/fixed,
        /pgf/number format/precision=4,
        /pgf/number format/fixed zerofill=true,
        rotate=90
    },
  scaled x ticks=false,
  y tick label style={
        /pgf/number format/fixed,
        /pgf/number format/precision=3,
    },
  ]
  \addplot[color=orange,mark=*,mark options={solid,draw=orange,fill=orange},smooth]
    coordinates {
    (0.00341,2.67)(0.00335,2.44)(0.00330,2.24)(0.00324,2.06)(0.00319,1.88)(0.00314,1.72)(0.00309,1.56)
    };
    \addlegendentry{$x_1 = 0.3$};
  \end{axis}
\end{tikzpicture}

\end{document}

enter image description here

| improve this answer | |

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