Skip to content

pgfplots in Scissor LaTeX

The pgfplots package works in Scissor LaTeX for most 2D plots, drawn by its own renderer: axes, line, scatter and bar plots, formulas, tables and CSV files, log axes, error bars, legends, groupplots, fill between and heat maps seen from above; 3D views, axis equal and pgfplotstable's tables are not supported yet.

What the package does

pgfplots draws plots from data or formulas inside a TikZ picture. You open \begin{tikzpicture}\begin{axis}[...], add one \addplot per series, and pgfplots chooses ticks, a legend and colours. Its options cover logarithmic axes, bar charts, error bars, colour maps and much more.

Scissor LaTeX does not run pgfplots. The typesetter reads the same code and draws the plot itself, as vector graphics, with the labels in your document's fonts. The result follows pgfplots' defaults closely, and the source compiles unchanged in a TeX installation.

What works here

FeatureIn Scissor LaTeXMore
axis with labels, title, legend, grid, ticks, rangesWorkspgfplots basics
Lines, marks, colours, cycle lists, smooth, const plotWorksLine plots
only marks, scatter plotsWorksScatter plots
ybar, xbar, stacked bars, nodes near coords, symbolic x coordsWorksBar charts
error bars/.cd, y explicit, +- (x, y)WorksError bars
semilogyaxis, loglogaxis, xmode=logWorksLog axes
groupplot with group style (library groupplots)WorksGroup plots
\addplot table from inline rows or a .csv/.dat file in the projectWorksData from CSV
\addplot3 with view={0}{90}: surf, matrix plot, contour filled, colorbarWorksContours and heat maps
fill between (library fillbetween), name pathWorks
\pgfplotsset{...}, styles, compat=WorksBehaves like compat=1.18, whatever the setting.
\addplot3 with any other view (true 3D)Not supportedAn empty axis is drawn, with a message.
axis equalNot supportedIgnored with a message; the axes keep their own scales.
\pgfplotstabletypeset (pgfplotstable)Not supportedSkipped with a message, and the file name is printed.
Unknown optionsLeft outIgnored with a message that names the option; the rest is drawn.

Examples

A bar chart with value labels:

A bar chart with nodes near coords

LaTeXPreamble: \usepackage{pgfplots}Open in editor (opens in a new tab)
\begin{tikzpicture}
  \begin{axis}[ybar, bar width=12pt, ymin=0, ymax=52,
      symbolic x coords={Mon,Tue,Wed,Thu}, xtick=data,
      nodes near coords, enlarge x limits=0.2,
      ylabel={Visitors}, width=7cm, height=5cm]
    \addplot coordinates {(Mon,31) (Tue,44) (Wed,38) (Thu,27)};
  \end{axis}
\end{tikzpicture}

Two series read from a table written inside the document, with a legend:

Columns of an inline table

LaTeXPreamble: \usepackage{pgfplots}Open in editor (opens in a new tab)
\begin{tikzpicture}
  \begin{axis}[xlabel={Week}, ylabel={Hours of practice},
      legend pos=north west, width=7cm, height=5cm]
    \addplot table [x=week, y=erika] {
      week erika john
      1    4     2
      2    6     3
      3    5     5
      4    8     6
    };
    \addlegendentry{Erika}
    \addplot table [x=week, y=john] {
      week erika john
      1    4     2
      2    6     3
      3    5     5
      4    8     6
    };
    \addlegendentry{John}
  \end{axis}
\end{tikzpicture}

A surface seen at an angle is not drawn yet. The axis appears empty, and the Problems tab explains why:

A 3D view is not drawn

LaTeXPreamble: \usepackage{pgfplots}Open in editor (opens in a new tab)
\begin{tikzpicture}
  \begin{axis}[view={60}{30}, width=6cm]
    \addplot3[surf, domain=-2:2] {x^2 - y^2};
  \end{axis}
\end{tikzpicture}

Problems tab: 3D plots are drawn only when seen from above (view={0}{90}) for now

Compatibility

  • From a TeX installation to here: most 2D plots look as they do there, within a point or two. True 3D plots, axis equal and options outside the supported set are named in the Problems tab.
  • From here to a TeX installation: plots compile there unchanged with pgfplots. contour lua and contour gnuplot need LuaLaTeX or gnuplot there; contour filled needs neither.

The full manual is on CTAN: ctan.org/pkg/pgfplots. For drawings without axes, see TikZ.

Questions and answers

Do I need to install pgfplots to use it here?

No. Write \usepackage{pgfplots} as usual; Scissor LaTeX recognises the code and draws the plot in the browser.

Why is my 3D plot empty?

Only plots seen from above (view={0}{90}) are drawn so far. Other views give an empty axis and a message in the Problems tab.

Can I plot data from a CSV file?

Yes. Add the file to the project and write \addplot table[x=a, y=b, col sep=comma] {file.csv};.

Every example on this page is typeset by Scissor LaTeX when the site is built. Last updated 2026-11-06.