Function Plot

dgmo
function Cannonball Trajectories by Elevation
x-label Distance (meters)
y-label Height (meters)
x 0 to 250

15 degrees(blue): -0.001*x^2 + 0.27*x
30 degrees(green): -0.002*x^2 + 0.58*x
45 degrees(red): -0.003*x^2 + 0.75*x
Function15 degrees30 degrees45 degrees 0 10 20 30 40 50 0 50 100 150 200 250 Cannonball Trajectories by Elevation

Syntax

function Chart Title
x-label X Axis Label
y-label Y Axis Label
x: min to max

Label(color): expression

Metadata Keys

KeyDescriptionRequired
chartMust be functionYes
titleChart title displayed above the chartNo
x-labelLabel for the X axisNo
y-labelLabel for the Y axisNo
xX range in format min to maxNo

Data Format

Each data line defines a named function with an optional color and a math expression:

Label(color): expression

Expressions support:

  • Basic arithmetic: +, -, *, /
  • Exponents: x^2, x^3
  • The variable x represents the X axis value

Colors

Specify colors in parentheses after the function name:

Parabola(blue): x^2
Linear(red): 2*x + 1