Why would you want to plot a mathematical function using a drawing package like Inkscape rather than a mathematical package like Mathematica or R? One reason is that you may want plot for its visual properties. For example, you might want to include a sine wave in a drawing.
Another reason is that you may want to have more control (or at least easier control) over your plot. Mathematical packages make it easy to produce a basic plot with default options. But I’ve found it difficult to change the aesthetics of a plot in every mathematical package I’ve used. The things I want to do are often possible but require arcane options that I have trouble remembering. In a drawing program, it’s obvious how to manipulate a plot as an image.

Inkscape provides a couple extensions to include function plots in a drawing. One is “Function Plotter” and the other is “Parametric Curves.” Both are found under Extensions -> Render. The following dialog shows the settings used to produce the graph above.

The first time I tried using these extensions nothing happened. Then I discovered you have to select a rectangle to contain the plot before creating a plot; the plotting tools do not create their own rectangles.
The Function Plotter supports rectangular and polar coordinates. You’re in for quite a surprise if you expect rectangular coordinates when the polar coordinates box is checked.

{ 4 comments… read them below or add one }
Tomas Olsson 12.22.09 at 08:00
Do you know of an easy way of plotting data using Inkscape?
John 12.22.09 at 08:49
I don’t know of a way to plot data, but I wouldn’t be surprised if someone has written such an extension.
The function plotting extension is essentially a Python interpreter. There may be a way to have it call Python code that gives it your data.
Tomas Olsson 12.22.09 at 08:58
Well,
I have been trying to find one, but the only thing I have found is rather cumbersome ways of doing it like described at http://trinifar.wordpress.com/2007/02/21/creating-graphs-with-inkscape/ (and in the comments)
Thanks anyway for pointing me to this useful tool.
/Tomas
Janne 12.27.09 at 21:28
For data plots I tend to produce a basic plot with gnumeric or similar, and export the plot as an svg file. Then I open that file with inkscape and edit it to make it visually pleasing.