Creating plots

Example

scf(); //create figure
// clf(); to clear figure
//definition of the x-axis and the y values
x= [0: (%pi/20): 2*%pi];
y=sin(x);
//plot the data
plot(x,y);
plot(x,sin) // ... does the same
plot(x,2*y); // will be plotted in the same figure
// xdel(); to close figure

Managing a figure

At first a graphic figure should be prepared. It is possible to clear an existing figure or to generate a new one.

Launch the following commands :

num = 1234;
scf(num) // create figure with number num or set figure num to the current figure
clf(num) // clear figure num
xdel(num)  // closes graphic windows num

All plotting action will be done in the current figure. The variable num can be left out, to address the current figure (e.g. clf()).

public: howto/do a plot (last edited 2018-08-12 08:13:38 by harigovindind@gmail.com)