Simple Plotting

This tutorial uses a custom javascript plotting system built on the Flot library (http://code.google.com/p/flot/). The plotting interface provided by perltuts.com is still under heavy development and may change.

The plot command accepts a list of datasets to be plotted. Valid datasets include a simple arrayref of y values (x values will be generated),

plot([1, 2, 3]);

... an arrayref of x-y points

plot([[1,1],[3,9],[5,25],[7,49]]);

... a 1D PDL object containing y values

plot(pdl(1,2,3));

... or an arrayref of 1D PDL objects of x and y values respectively

plot([pdl(1,3,5,7),pdl(1,9,25,49)]);