Skip to content

Grapher

Plot functions, equations, inequalities, polar and parametric curves, explore them with sliders, and read off roots and turning points.

The grapher plots anything you can write on a calculator and more: functions, implicit equations such as circles, shaded inequalities, polar and parametric curves and points, with sliders for any constant. It is drawn in monochrome, with each curve distinguished by its line style.

Open it from Grapher in the sidebar, the home tab or the command palette, or by selecting a formula in a note and choosing Graph. Each of these opens a new graph tab, and every graph tab is independent and remembers its expressions.

Expressions#

The Expressions panel (on the left, or under the graph when the pane is narrow) holds one expression per row. Type an expression and it is plotted as you type. If a row cannot be plotted, a short message under it says why.

KeyIn an expression row
EnterAdd a new row below
Backspace on an empty rowRemove the row and move up
↑ ↓Move between rows

Each row starts with its number and a swatch of its line style. Click the swatch to hide or show that curve without deleting it, and use the × at the end of a row to remove it. Add expression adds a row at the bottom, and Clear all (the bin icon at the top of the panel) starts again from a single empty row. The Try an example list under the expressions has one example of each kind of plot.

Tip

You can paste LaTeX straight into a row. Copy a formula from a note, or anywhere else, and the grapher converts it, so \frac{1}{x^2+1} becomes ((1)/(x^2+1)).

The Grapher syntax reference lists everything an expression can contain.

Moving around#

The controls in the top-right corner of the graph:

ActionHow
ZoomScroll over the graph (zooms around the pointer), or use Zoom in (+) and Zoom out (−)
PanDrag the graph
Reset the viewDouble-click the graph, or choose Reset view
Radians on the x-axisToggle π to label the x-axis in multiples of π
GridToggle the grid lines
Save an imageChoose Export PNG to download graph.png

On wider panes, the bottom-left corner shows the coordinates under the pointer.

Points of interest#

Hover near a curve of the form y=f(x)y = f(x) and the grapher snaps to the nearest point of interest and labels it:

  • roots, where the curve crosses the x-axis
  • turning points, where the gradient changes sign
  • the y-intercept
  • intersections with other y=f(x)y = f(x) curves

Away from those points, hovering traces the nearest point on any curve. Values are found numerically and shown to four decimal places, which is plenty for checking an answer but no substitute for the exact working an exam expects.

Points you plot, such as (2, 3), are always labelled with their coordinates.

Sliders#

Any letter that is not a coordinate becomes a slider, so you can see how a constant changes a curve.

  • Write a = 2 on its own row to create a slider for a starting at 2.
  • Or just use a new letter in an expression, such as y = a x^2 + b. Sliders for a and b appear automatically at the bottom of the list, starting at 1.

Drag a slider to change its value; on a row such as a = 2 the row updates as you drag. The numbers either side of a slider set its range, from −10 to 10 by default; click one to type a new limit.

y = x^2 y = 0.5 x^2 + 1 y = 2 x^2 - 1

The graph above shows y=ax2+cy = ax^2 + c for three pairs of values. In the grapher, y = a x^2 + c with two sliders shows the whole family at once.

Line styles#

Margin is strictly monochrome, so curves are told apart by dash pattern, weight and shade rather than colour. Each new row takes the next unused style, and the swatch at the start of the row shows which line is which. Strict inequalities (< and >) draw their boundary dashed; <= and >= draw it solid, matching the convention for sketching regions.

From notes to the grapher#

Graphs inside notes have an Open in grapher button that loads the figure into a new grapher tab, ready to explore. Curves, points and constants come across as they are; a line segment comes across as its two endpoints, and shaded areas are left out. Selecting a formula in a note and choosing Graph does the same for that formula.

What it does not do#

  • Trigonometric functions work in radians. For degrees, convert inside the function: y = sin(x pi/180). Pasted LaTeX such as 30^\circ is converted for you.
  • There is no calculus mode: derivatives and integrals are not plotted directly. Plot the derivative you have worked out alongside the original to check it.
  • Each row holds one equation or inequality. For a region such as 1<x<31 < x < 3, use two rows: x > 1 and x < 3.
  • Polar and parametric curves are always drawn for 00 to 2π2\pi. See the syntax reference for how to cover a different range.
  • Only the + branch of ± is plotted when you paste a formula containing it. Add the − branch as a second row.

Search documentation

Search every page of the Margin docs