# Plotter - examples

Some examples of curves created by plotter, just to get an idea what it might be good for. All images on this page are drawn on the fly: the URLs of the plots (yes, the ugly ones with the ridiculously long query string) were created once in the UI part and copied into the src-attribute in an image-tag (see page source for a real-life example).

Whenever the page is loaded or reloaded, the plotter creates the images and serves them to the browser. A plot of a single period of sine and cosine ($x$ in the range of $0$ to $2\pi$). The settings used for this plot are

• function 1: $\sin(x)$, range $0$ to $2\pi$, legend shown
• function 2: $\cos(x)$, range $0$ to $2\pi$, legend shown
• background Color is white with black captions and a grid in #f2f2f2
• plot ranges: $x$ from $-1$ to $2\pi +1$, $y$ from $-2$ to $2$
• local maxima/minima are shown as additional points

This is a plot describing the movement of an underdamped harmonic oscillator in a single dimension: $y(t) = A \cdot e^{-\gamma t} \cos(\omega t + \phi)$ for a linear damping force $F = -c\cdot v$ and a damping coefficient of $\gamma = \frac{c}{2m}$. Underdamping occurs when the damping coefficient is lower than the undamped resonant frequency of the oscillator.

For the example plot an amplitude $A = 4$, a phase $\phi = 0$, damping coefficient $\gamma = 1/3$ and a frequency of $\omega = 3$ was used.

The switching process at $t=0$ is modeled by a Heaviside function. Here's a real-life example: a plot of a simple rational function created for one of my basic maths tests

• the function used is $f(x) = \dfrac{x}{x^2+1},$ drawn in an interval from -8 to 8
• axes and tick marks are set to grey
• a local minimum, a local maximum and the function's points of inflection (labeled W) are shown in black Just to show the possibility, the last plot is a bit more funky (yeah!): this is a gaussian distribution with a mean of 2 and a variance of 1. The area below the curve is filled and the image is blurred and embossed afterwards by GD's filters. Finally the whole plot is rotated clockwise by 10°. 