55

A chart with data in the range of 200,000 and small difference between max and min values, will be assigned a 10^5 multiplier to the entire axis. This results in the ticks becoming meaningless, since all become 2.

Example:-

\begin{tikzpicture}
\begin{axis}
  \addplot coordinates {
  (100,200001)
  (200,200003)
  (300,200005)
  };    
\end{axis}
\end{tikzpicture}

When this is plotted the y-axis has 5 ticks, all of which are 2. The y-axis has a multiplier of 10^5. This has effectively removed all information from the graph.

I may use the below to set the explicit value of the tick values but this does not implement change in the display "style" of the axis ticks.

ytick = {200000, 200005, 200010}

I have also tried increasing the precision of the tick label to 5. However this only results in the graph showing labels such as 2.00000, 2.00005, 2.00010 with a 10^5 axis multiplier.

yticklabel style={precision = 5,}

My question is "How do I remove/change this 10^5 multiplier, such that the y-axis ticks are displayed in the form 200000, 200005, 200010.

Phil
  • 675
  • Yes, my question is how can this axis multiplier be removed. An example, simply plot the following:- \addplot coordinates { (100,200001) (200,200003) (300,200005) }; – Phil Jan 28 '11 at 09:58

1 Answers1

67

You can disable the common scaling factor using scaled y ticks = false in the axis options. This will lead to each individual tick label being displayed in scientific notation, which you can suppress by also using y tick label style={/pgf/number format/fixed} (see section "4.18.1 All Supported Styles" of the PGFplots Manual for the other options of formatting the numbers).

\documentclass{minimal}
\usepackage{pgfplots}

\begin{document} \begin{tikzpicture} \begin{axis}[ scaled y ticks = false, y tick label style={/pgf/number format/fixed, /pgf/number format/1000 sep = \thinspace % Optional if you want to replace comma as the 1000 separator }] \addplot coordinates { (100,200001) (200,200003) (300,200005) };
\end{axis} \end{tikzpicture}

\end{document}

Unscaled y axis

Jake
  • 232,450