1

I want a scatterplot of a particular $f(n)$, $n=0,1,\dots, 20,000$. The labels along the x-axis add nothing to the reader's understanding, so they shouldn't appear. The snippet below does eliminate the labels on the individual ticks (0.5, 1, 1.5, 2), but it does not eliminate the scale factor. What you end up with is a plain x-axis, as desired, but with an incongruous $\cdot 10^4$ on the lower-right.

\begin{figure}[h]
\centering
\begin{tikzpicture}[scale = 1.20]
  \begin{axis}[enlargelimits=false,
      scale only axis = true,
      width=0.35\textwidth,
      height=0.4\textwidth,
      xticklabels=\empty]
  \addplot+[only marks,mark size = 0.020mm] table {data1.out};
  \end{axis}
\end{tikzpicture}
\caption{Plot of 20,000 points of $f(n)$.}
\end{figure}

To be clear, data1.out consists of two columns. The values in the first column are simply 0, 1, 2, all the way to 20,000. The values in the second column are in the range from 0 to 0.50.

Torbjørn T.
  • 206,688
  • Hi, welcome. A small tip: to make an example for a case like this, you could do \addplot+[only marks,mark size = 0.020mm] coordinates {(0,0) (20000,0.5)}; That should give the same range for the axes. – Torbjørn T. Jan 08 '21 at 16:34
  • That said, add scaled x ticks=false: https://tex.stackexchange.com/questions/9803/how-do-you-remove-the-axis-multiplier/9847#9847 – Torbjørn T. Jan 08 '21 at 16:38
  • You mean instead of messing with width and height? There's something subtle going on with the particular function, and you can't see it unless the aspect ratio is just right. – Randall Fairman Jan 08 '21 at 16:40
  • Yes! scaled x ticks=false did it. Thank you! – Randall Fairman Jan 08 '21 at 16:42
  • You're welcome :) (The point of my first comment was just a way of making a self-contained example. In many cases you'll get asked to make a complete, minimal, self-contained example (MWEs, see https://tex.meta.stackexchange.com/q/228), so that it's easy to test the code and see the problem at hand. Sometimes an MWE can be entirely required in order to properly understand the problem, and in most cases potential answerers will appreciate having an example anyway.) – Torbjørn T. Jan 08 '21 at 16:53

0 Answers0