Fundamental Graphs for Graph Drawing

Last updated 2026 April 2

Just like with standard integrals, in graph drawing there are a number of basic graphs that you should absolutely know how to draw.

Linear

y=py = p

For any xx, we produce a constant yy-value, pp. In other words, it’s a horizontal straight line.

y = p
p = 2

x=qx = q

What points in the 2D plane have an xx-coordinate of qq? It’s all the points along the vertical line intersecting the xx-axis at qq.

It’s identical to y=py = p, only in a different orientation. Just 2 different ways of thinking about the same concept.

x = q
q = 3

y=xy = x

For every xx-value, we output an equivalent yy-value. This looks like a straight line at 45°45 \degree above the positive xx-axis.

y = x

Polynomials

x2x^2

Famously known as a “happy parabola”, symmetrical in the yy-axis.

y = x^2

x3x^3

y = x^3

xpx^p

For all pZ+p \in \mathbb{Z}^{+}, xpx^p will always intersect the origin (because 0p=00^p = 0 as long as p>0p > 0).

x^p

/slider{ min: 0.1 } :: p = 2

x2px^{2p}

All even positive powers of xx produce even graphs. This is because an even number of multiplications cancels out pairs of - signs.

f\left( x \right) = x^{2p}
f\left( -x \right)

/slider{ min: 2, step: 2 } :: p = 4

x2p1x^{2p-1}

All odd positive powers of xx produce odd graphs. This is because one - sign will be left unpaired and hence not cancelled out through the multiplications.

f\left( x \right) = x^{2p-1}
-f\left( -x \right)

/slider{ min: 1, step: 2 } :: p = 3

(xp)(xq)(x-p)(x-q)

Only when x=px = p or x=qx = q does the output yy becomes 00. That means the graph intersects the xx-axis twice, at (p,0)(p, 0) and (q,p)(q, p).

This is a (positive) quadratic with roots at x=p,x=qx = p, x = q.

y = \left( x-p \right) \left( x-q \right)
/asympt :: x = p
/dashed :: x = q

p = -2
q = 3

(xp)(xq)(xr)(...)(x-p)(x-q)(x-r)(...)

More generally, any factorised polynomial in this form has roots p,q,r,...p, q, r, ... since whenever xx is one of these values the whole polynomial collapses to 00.

y = \left( x-p \right) \left( x-q \right) \left( x-r \right)
/dashed :: x = p
/dashed :: x = q
/dashed :: x = r

p = -3
q = 1
/hidden :: r = 2

Fractional Powers

x\sqrt{x}

y = \sqrt{x}

x1/px^{1/p}

y = x^{1/p}

/slider{ min: 1 } :: p = 3

Exponentials & Logarithms

exe^x

y = e^x

bxb^x

y = b^x

/slider{ min: 1 } :: b = 2

ln(x)\ln(x)

y = \ln\left( x \right)

logb(x)\log_b(x)

y = \log_{b}\left( x \right)

/slider{ min: 2 } :: b = 3

Reciprocals

1/x1/x

y = \frac{1}{x}

1/x21/x^2

y = \frac{1}{x^2}

1/xp1/x^p

y = \frac{1}{x^p}

/slider{ min: 1 } :: p = 3

Miscellaneous

x|x|

y = \left| x \right|

max(x,0)\max(x, 0)

Also known as the rectified linear unit, this looks like a ramp, 00 for all negative values.

y = \operatorname{max}\left( x,\ 0 \right)

See an oversight or error? Drop an issue on GitHub.