Useful pgfplots commands

Set categorical axis labels

Read data from file

The data file needs to be tab-separated. The first column is treated as x-value.

 Use percentage as axis label

If the y-values are given in a range of, say, 0.0 to 1.0, the following command displays them as 0% to 100% on the y-axis.

Do not connect data points with lines (scatter plot)


  • [1] Plotting experimental data with pgfplots by Josef Wright (TUGboat, Volume 31 (2010), No. 1)
  • [2] Official pgfplots gallery

Leave a Reply