How do I plot a mathematical function in Mandriva?
Well, you have a few options, one is to use the KDE application kmplot, the other is to play around with more advanced plotting software such as Grace or Gnuplot...
Plotting a function with kmplot
The quick and easy solution is to use kmplot. If your installation of Mandriva is running under KDE, you should be able to access it from the main KDE menu, under More applications -> Education -> Sciences -> kmplot (Figure 1).
The program is quite limited, but you'll get a fairly good looking plot in less than a minute, which can be quite handy from time to time.
In kmplot, simply click on the curve icon, enter the formula of the mathematical function you want to plot, hit apply, et voilà, you have your plot (Figure 2)!
Finally, you may want to play around with axis, colors, steps, and so on. All of those options can be found in the View menu.
Plotting a function with Grace
You second option is to use the plotting tool Grace. Grace is more complex, but it is a full featured plotting software, so you'll be able to do way more that plot a basic curve.
I already wrote a tutorial on Grace, Scientific Plots with Mandriva Linux, so if you want to learn the basics, such as setting colors, axis, or many other options, have a look at it!
To plot a curve with Grace, select the menu Edit -> Data sets. In the datasets window, right-click on the clear area, and select Create new -> By formula (Figure 3). In the formula window, enter your equation, and simply Apply or Accept (Figure 4). For the plot in Figure 4 for instance, I enterred the following parameter:
- Parameter mesh starts at
0, ends at10, with100points, x = $ty = $t * sin($t)
Accept, and the Autoscale button in the main window. Et voilà!
For more options, such as line colors or axis style, have a look at my old tutorial, Scientific Plots with Mandriva Linux, it's all there!
Links and more info
- kmplot homepage,
- Grace homepage,
- Scientific Plots with Mandriva Linux,
- Gnuplot homepage, for the fans of the command lines!
03/2006 |




yogendra, 10 November 2006
ihgig