How to Plot Functions in SciDAVis
You don’t need a data table to make a plot in SciDAVis. If you want to visualize a mathematical function — a sine wave, a Gaussian, a parametric curve — you can plot it directly from its formula. This tutorial walks you through creating function plots step by step, following the official SciDAVis handbook.
Step 1: Open the New Function Plot dialog
Go to File → New → New Function Plot. The faster route is the keyboard shortcut Ctrl+F, or the function-plot icon on the File toolbar. Either way, a dialog box opens where you define the mathematical expression of your function.
Note the difference from regular plotting: when you plot data, you first fill a table and then choose a Plot menu command. A function plot skips the table entirely — SciDAVis evaluates your formula itself and draws the curve.
Step 2: Enter the expression, range, and number of points
The dialog asks for three things:
- The mathematical expression of your function, e.g.
sin(x)orx^2 - 3*x + 1. - The X range used for the plot — the interval over which the function is evaluated, e.g. from 0 to 2*pi.
- The number of points computed in this X range. More points give a smoother curve; the default is fine for smooth functions, but sharp features (spikes, discontinuities) need more.
Tip: if your curve looks jagged or misses a narrow peak, don’t change the expression — increase the number of points first. Sampling density, not the formula, is usually the culprit.
Step 3: Choose the coordinate system
SciDAVis function plots support three coordinate systems, all defined in the same dialog:
- Cartesian — Y(X): the classic case. Enter Y as a function of X, e.g.
exp(-x^2)for a Gaussian. - Parametric — (X(t), Y(t)): X and Y are each defined as functions of an independent parameter m. You set the range for m and the number of points computed in that range. This is how you draw circles, ellipses, Lissajous figures, or any curve that isn’t a function of X.
- Polar — r(theta): defined by a radius R and an angle theta (in radians). SciDAVis converts internally with
X = R·cos(theta)andY = R·sin(theta). You can also use the parametric form:R = f(t)andtheta = f(t), with the range and point count for t. Cardioids, spirals and rose curves live here.
Step 4: Customize the plot
Clicking OK creates a new graph window with your curve inserted as a new layer — the same kind of graph window you’d get from plotting table data. Everything from here is identical to a data plot: use the Format menu to change line styles, colors, axes, tick labels and fonts, and the Graph menu to add text labels, lines, arrows, a legend or images.
Want a second curve on the same axes? Use the Add Function command (Plot menu) to add another function to the existing plot instead of creating a new window. This is the clean way to overlay, say, a fit model on top of measured data — or to compare two candidate functions directly.
Step 5: Combine functions with data tables
Often you want both: measured data and the theoretical curve. The handbook’s recommended combined workflow is: create a table, fill it with the results of a function using the Assign Formula command, then select the columns and use a Plot menu command. This gives you a data-backed curve you can fit, differentiate or integrate — things a pure function plot can’t do.
As a rule of thumb: use New Function Plot (Ctrl+F) for quick visualization and teaching, and the table + Assign Formula route when the curve will feed into further analysis.
Worked example: a damped oscillation
Let’s put it together with a concrete case — the kind of curve physicists plot daily. Press Ctrl+F, and in the dialog enter the expression exp(-0.3*x)*sin(2*pi*x), an oscillation that decays over time. Set the X range from 0 to 10 and the number of points to 1000 — a thousand points over ten units gives smooth peaks without slowing anything down.
After clicking OK, open the Format menu and set the line to a solid 2-pt blue, then use the Graph menu to add a text label with the formula. In under a minute you have a publication-ready figure of a damped sine wave, with no table and no external data. Try changing the damping factor from 0.3 to 0.8 and re-plotting — the envelope collapses visibly, which makes function plots excellent for building intuition before you touch real data.
Quick reference
- New function plot: File → New → New Function Plot, or Ctrl+F
- Cartesian: Y as a function of X over an X range
- Parametric: X(m) and Y(m) over a range of the parameter m
- Polar: R and theta (radians); X = R·cos(theta), Y = R·sin(theta)
- Add another curve: Plot → Add Function
- Function → data table: Table → Assign Formula, then plot the columns
Ready for the next skill? Browse the full SciDAVis tutorials — from importing data and fitting curves to multi-layer plots and 3D surfaces.
