Tutorial showing the installation of the Andrew's Vector Toolbox plugins as well as the basic use of the star plugin tool MAC OS X - note this plugin is only. The project started in 1993 with SciPlot on NeXTStep and continues with 'Plot' for OS X till 2007. Plot is designed for everyday plotting: it is easy to use, it creates high quality plots, and it allows easy and powerful manipulations and calculations of data. Plot is a scientific 2D plotting program. This project started in 1993 with SciPlot on NeXTStep and continues with 'Plot' for OS X till 2007. Plot is designed for everyday plotting, it is easy to use, it creates high quality plots, and it allows easy and powerful manipulations and calculations of. Plot is a scientific 2D plotting program. This project started in 1993 with SciPlot on NeXTStep and continues with 'Plot' for OS X till 2007. Plot is designed for everyday plotting, it is easy to use, it creates high quality plots, and it allows easy and powerful manipulations and calculations of.
use of parameters
In the usual 2-dimensional plot of gnuplot, the Y coordinate isexpressed by y=f(x), however you can also use a parametricexpression which uses the parameter t,
With this expression, more complicated functions can be plotted withgnuplot. Note that the 3-dim. plot with two parameters u,vis given in thespherical harmonics section.
First of all, you need to use the command set parametric to tell gnuplot that the function is defined by a parameter.Then, the plot command followed by a function f(t) whichis the X-coordinate and a function g(t) for Y-coordinate, is givelike, plot f(t),g(t).
to draw a vertical line
The most simple but it is impossible to express by the y=f(x) formis a vertical line which is x=const. This function can be written as:
with the parameter t, when t is varied. The range of t is controlled by the command set trange .
In this case the vertical line is draw at x=3. Since we used settrange [1:4] , the range of this truncated line is from 1 to 4.If trange not set, the vertical line is drawn from the bottomto top border lines.
to draw a circle, polygons
The parametric expression of a circle is
and the circle can be drawn if one changes the t parameterfrom 0 to 2pi. The graph is 'squared' here, and the t rangeis given by an option of plot command.
The parameter t is not changing continuously, and actuallythis is controlled by the value which is set by the setsamples command. The default value is 100. In the case of set samples 8 , gnuplot generates eight t valuesfrom zero to 2*pi, and the graph becomes a regular heptagon. Ifyou need a regular N-gon, just type set samplesN+1.
The 2-dim. parametric representation is convenient to draw afunction which is in a polar coordinate.The 2-dim. polar coordinate has two variables which are radiusr and angle theta. The gnuplot parameter t isfor the theta, and the radius r is expressed by afunction of angle, namely r(t). A (x,y) coordinate is givenby
The circle is a special case of which r(t)=const. When the radius ofcircle is proportional to t, you get a spiral.
The following example shows r(t)=const*(1+cos(t)), which is calledCardioid.
exchange X and Y-axes
Functions are normaly expressed by y=f(x), but the parametricexpression allows us to make a graph of x=f(y). The y values arethe same as t, and the x values are calculatedwith a function of f(t).
Two functions are shown, one (green stripe) is y=2pi*cos(x), and the other(red solid line) is x=f(t)=2pi*sin(y).
The option with impulse draws a vertical line from theY=0 axis. If you use with impulses for the red curvewhich is x=2pi*sin(y), you still get a vertical stripe, not ahorizontal one.