ZeGrapher, open source plotting software

12 min read Original article ↗

Features

ZeGrapher draws mathematical objects in the plane — functions, sequences, parametric equations and data — and exports exactly what you see.

  • Functions written the way you write them on paper, f(x) = 2 + cos(x). You get the usual mathematical functions, plus every object you define yourself.
  • Sequences from their recurrence relation, first terms included: u(n) = 0 ; 1 ; u(n-2) + u(n-1).
  • Parametric equations, drawn over the interval you choose.
  • Constants and variables are shared by every object, so one value drives a whole family of curves. A constant can:
    • slide between two bounds, by hand or as an animation
    • hold several values at once, and every curve that uses it is drawn once per value
  • Data imported from CSV, and edited in a table like a spreadsheet. Tested on files of several million cells.
  • Objects that build on each other: any named object can be used in the expression of another, and in the cells of a data column.
  • A graph you can navigate: drag to move, scroll to zoom, one axis at a time if you want.
  • Customization down to the grid: ticks as multiples of an expression such as π, and separate subdivisions and colors for x and y.
  • Exports identical to the preview, vector (svg, pdf) or image (png, jpeg, bmp, ppm). You give the size in real centimeters.
  • Pick up where you left off: the app saves your work when you close it, and brings it back at the next start. You can also save it to a file of your own, and open it whenever you want.
  • A built-in manual, opened next to the graph, in the language of the app.
  • In 9 languages: the app and its manual are in English, French, German, Spanish, Italian, Portuguese, Russian, Japanese and Chinese.

Documentation

The ZeGrapher window

1. The graph

The graph, drawn from the objects of the Math tab

The graph is what you see on the right, and what you export. The Grid and Graph tabs set its look, its precision and its size.

1.1. Moving and zooming

You drive the graph with the mouse:

Action Mouse
Move the view Drag with the left mouse button
Zoom both axes at once Scroll wheel
Zoom the y axis only Ctrl + vertical scroll
Zoom the x axis only Ctrl + horizontal scroll or
Ctrl + Shift + vertical scroll

The zoom keeps the point under the cursor in place.

On a touchpad or a touchscreen, a pinch zooms both axes too.

2. The user input panel

The panel, and the two buttons on its edge

The four fields at the top of the panel are the bounds of the view. Under them are five tabs:

Tab What it holds
Math the objects you plot: equations, constants, parametric equations, data
Grid ticks, grid and sub-grid
Graph size, font, background, axes
App language, font, syntax colors
About version, updates, licenses, release notes

The three buttons at the bottom left are for files.

On the edge of the panel:

  • the arrow button folds the panel away, and brings it back
  • the bookmark button under it opens and closes this documentation
  • drag the line along the right edge to change the width of the panel

2.1. View range

The four fields at the top of the panel accept expressions, not just numbers. A minimum must stay below its maximum, and the field turns invalid if it does not.

The bounds of the view

2.2. Files

The export, save and load buttons

The three buttons at the bottom left of the panel are, in order:

  1. Export the graph you see, in a vector format (svg, pdf) or as an image (png, jpeg, bmp, ppm). The export looks exactly like the graph on the screen. Shortcut: Ctrl + E.
  2. Save the objects, the data, the view and the settings of the Grid and Graph tabs as a ZeGrapher document (.zg). The first save asks for a file, and the next ones write to it. The settings of the App tab stay out of documents. Shortcuts: Ctrl + S, and Ctrl + Shift + S to save to another file.
  3. Load such a document. The app adds its objects to the ones already open, and takes the view and the settings from the document. Shortcut: Ctrl + O.

On macOS, the shortcuts use Cmd instead of Ctrl.

A .zg document dropped on the window loads like Load does, and a CSV file dropped on it opens the CSV import into a new sheet.

At the next start, ZeGrapher opens your last work again. If you give a .zg file on the command line, the app opens that file instead.

3. Math tab

The Math tab, with a constant and two equations

This tab defines the objects to plot, or to use inside other objects: functions, sequences, constants (which are never plotted), parametric equations, and data columns.

3.1. Adding an object

This button, at the bottom of the Math tab, adds an object.

The button that adds an object

The dropdown at the top of the new card sets the kind of object.

One object and its card

Every card carries the same buttons:

  • The eye button shows or hides the curve.
  • The brush button opens the plot style.
  • The disc is the color of the curve.
  • Drag the handle on the right to reorder the objects.
  • The × in the corner deletes the object.

3.2. Functions and sequences

You define a function by its natural equation:

f(x) = 2 + cos(x)

These functions are built in, and work in any expression:

Kind Functions
Trigonometry cos, sin, tan, acos, asin, atan
Hyperbolic cosh, sinh, tanh, acosh, asinh, atanh
Hyperbolic, short names ch, sh, th, ach, ash, ath
Powers and logarithms sqrt, exp, ln (base e), log (base 10), lg (base 2)
Rounding floor, ceil
Two arguments max, min
Others abs, erf, erfc, gamma (also written Γ)

These constants are built in:

Name Value
math::pi, math::π 3.141592653589793
physics::kB the Boltzmann constant, 1.380649e-23
physics::h the Planck constant, 6.62607015e-34
physics::c the speed of light in vacuum, 299792458

The three physics constants hold their value in SI units.

A sequence is a list of expressions separated by , or ;. The first expressions are the first terms of the sequence. The last one is the general term, and the app uses it for every index after those first terms.

u(n) = 0 ; 1 ; 0.5*(u(n-2) + u(n-1))

A function and a sequence

The border of an input line takes a color that tells you whether the expression is valid. An invalid one also gets a message underneath, with the reason.

An empty line, a valid one, and an invalid one

A field that expects a value, such as a bound of the view, can take the warning color instead: the expression is valid, but it yields no number.

A bound whose expression has no value

You choose these three colors in the App tab.

3.3. Constants

A constant is a name with a numeric value. Every other object, except another constant, can then use it in its expression.

A constant, its slider and its animation

3.3.1. Animation

The slider underneath moves the value between min and max, and every curve that uses the constant follows. Drag the slider by hand, or animate it. The row under the slider holds the animation controls: play, loop, ping-pong, and the period of one sweep.

3.3.2. Several values at once

This button on a constant card turns it into a Schrödinger constant.

The cat button, turned on

The constant then holds steps + 1 values, at equal distances from min to max. The app plots every object that uses the constant once per value.

A constant taking six values at once

These objects get a second color disc. The app draws the family of curves as a gradient from the first color to the second.

3.4. Parametric equations

A parametric equation is a pair of objects that give the coordinates of each point of the curve. Name them in the two fields:

A parametric equation over two functions

The app plots the pair between the Start and End, defined in the plot style of the parametric equation.

3.5. Data

A data sheet, its table and its plot

A data object is a sheet of named columns. Each column is a math object of its own, with a name and the same buttons as any other object.

One column of a sheet

The app plots the values of a column against its indices: the first value at x = 0, the second at x = 1, and so on. To plot one column against another, use a parametric equation.

The buttons under a sheet

The buttons at the bottom right of the sheet import a CSV file, export the columns to a CSV file, and add a column. Drag the bar underneath to resize the sheet, and double-click it to give the sheet its default height again.

3.5.1. The data table

Two columns in the table

The table button on a column shows that column in the table next to the panel. In the table:

  • Click a cell, then type to edit it, or press Enter to open the editor.
  • Click a header to select a whole row or a whole column.
  • Click and drag for a rectangular selection of cells.
  • Press Backspace to clear the content of the selected cells.
  • Press Delete to remove the selected cells. The values below them move up.
  • The right-click menu holds those same two actions, under Clear and Delete, and it adds Insert row above and Insert row below. Both Insert entries act on the active cell.

Selecting a whole column and pressing Delete also deletes the column object in the Math tab.

3.5.2. Filling a column from an object

The bar-chart button on a column opens a small form: name an object, give a Start, an End and a Step. The check button samples the object and loads the values into the column.

Filling a column with the values of f

3.5.3. Importing a CSV file

The CSV button is on a sheet, or at the bottom of the Math tab for a new sheet.

The CSV import panel

It opens a file dialog. A side pane then shows the import settings, with a preview of the file underneath. The preview updates as you change a setting:

  • Separator — the character between two values. Write \t for a TAB.
  • Header row — check it when the first row holds the column names.
  • Preview rows — how many rows the preview shows.
  • Skip rows — how many rows to ignore at the top of the file, such as comments or extra parameters.

Load makes columns out of the file, and Cancel leaves everything as it was.

We tested ZeGrapher on CSV files of several million cells.

3.6. Plot style

The brush button opens the settings that decide how an object is drawn:

The plot style of an object

  • Cartesian or Polar coordinates.
  • The line pattern — solid, dashed, dash-dotted, dotted, or no line — and its width.
  • For the objects drawn as points (sequences and data), the shape and the size of the point.
  • Start and End: the interval the app plots the object over. The default values are xmin and xmax, the bounds of the view. Both fields accept any expression, for example -math::pi and 4*math::pi.

4. The Grid tab — ticks and grid

The Grid tab

Coordinates sets the numbers along the axes: their spacing, the number of digits they can use, and a multiplier. The multiplier is an expression, so ticks can be multiples of math::pi, and the labels are written as multiples of it.

You set Grid and Sub-grid separately for x and y. Each one takes a color, a line width, and a switch that shows it or hides it. The sub-grid also takes the number of parts it cuts each cell into.

5. The Graph tab — look and precision

The Graph tab

By default the graph fills the window. Set Graph size to Custom, in the Size box at the top, and the graph becomes a sheet of the size you give. That size is in real centimeters. A centimeter is a real centimeter on the screen, and stays one in an exported pdf or svg.

Scaling, in the same box, resizes everything the app draws at once: the lines, the text and the ticks.

The app draws that sheet as a page in the window, with a zoom bar above it:

The zoom bar

The bar zooms the sheet on the screen, and the last button fits the whole sheet in the window. This zoom does not touch the graph: the bounds of the view stay as they are. Centimeter sizes are correct at 100% zoom.

The two boxes under Size:

  • Drawing: the font and the background color of the graph. Min points and Max points set how many points the app computes for each continuous curve, as a power of two. More points give a finer curve and a slower redraw.
  • Axes: line width, color, the titles written along x and y, and the font those titles use.

6. The App tab

The App tab

This tab sets the language and the font of the interface, and the three colors of the input lines: valid, warning and invalid.

7. The About tab

This tab tells what ZeGrapher is. It holds:

  • the version you run, and a button that asks zegrapher.com whether a newer one is out
  • links to the website, to the source code and to the author
  • the licenses of ZeGrapher, of Qt and of the bundled math font
  • a Donate button, which opens the donation page
  • the release notes: what each release brought, with a link to its page on GitHub

Download

ZeGrapher is free and open source, under the GNU AGPL license.

Version 4.0.0_rc0, released on 2026-10-21

Debian, Fedora, Ubuntu, Arch Linux and FreeBSD ship ZeGrapher in their official repositories. Their version can be older than the one above.

If ZeGrapher is useful to you, please consider a donation to support it.