Skip to content

Plot functions and curves in 2D

Graph expressions and your own functions in Zlv with plot, set the x range with from and to, compare several curves, then zoom, pan and change scale.

Add plot in front of an expression to draw it. The result appears as a small chart beside the line; click it to open a full interactive view.

Plot an expression

Live example
Edit the lines and press Run. Evaluated in your browser.

Evaluating…

from a to b sets the range of x. Without it, the plot uses -10 to 10. graph works as another name for plot in the desktop app.

Live example
Edit the lines and press Run. Evaluated in your browser.

Evaluating…

Plot your own functions

Define a function, then plot it by name.

Live example
Edit the lines and press Run. Evaluated in your browser.

Evaluating…

Several curves on one chart

Separate expressions or function names with commas.

Live example
Edit the lines and press Run. Evaluated in your browser.

Evaluating…

Trigonometric plots and angle units

Trigonometric functions use degrees by default, so choose a range in degrees:

Live example
Edit the lines and press Run. Evaluated in your browser.

Evaluating…

If you want to plot in radians while keeping degrees as your default, tag the variable with rad inside a function in the desktop app:

Desktop example
Uses the native Rust engine: copy it into Zlv Desktop to see results.

Results appear next to each line in Zlv Desktop. Download it free.

A curve for fun

Live example
Edit the lines and press Run. Evaluated in your browser.

Evaluating…

Exploring a plot (desktop)

Click the chart in the results column to expand it. In the expanded view you can:

  • Zoom with the mouse wheel or the zoom buttons, and pan by dragging or with the pan buttons.
  • Inspect values with the crosshair as you move over the chart.
  • Set an exact x range by clicking the domain bounds and choosing Apply Range.
  • Switch the scale between Lin, Log and Dual (a separate axis for the second curve).
  • Change the style to Line, Stem, Scatter or Area.
  • Show or hide individual curves from the legend.
  • Open the plot in your web browser as a standalone interactive page.

Plots react to your sheet

A plot is recalculated whenever the lines above it change. Combine a function with a slider to explore how a parameter changes a curve.

Live example
Edit the lines and press Run. Evaluated in your browser.

Evaluating…

All guides