Getting plot from SWP: using Gnuokit
SWP does not make plots itself but using Gnuplot instead. Gnuplot have to be installed manually. It could be downloaded from official site http://www.gnuplot.info.
SWP doesn't have to know Gnuplot language, although it might be usefull.
Download Gnuplot from official site http://www.gnuplot.info
Most of linux users could install Gnuplot following standard package installation procedure of their linux distribution.
For correct Gnuplot work for SWP
- Gnuplot diretory have to be listed in PATH environment variable
- Gnuplot should be named gnuplot (linux) or gnuplot.exe (Windows).
In case of linux all package executables are usually installed to /bin or /usr/bin directory listed in
In Windows Gnuplot Setup should ask to add Gnuplot to PATH. If it was rejected or in case of manual install this should be done manually by altering corresponding system option.
If Gnuplot executable differs from gnuplot or gnuplot.exe there is two options
(a) create executable file in linux named gnuplot:
in Windows named gnuplot.bat
and place it to PATH listed directory.
(b) modify SWP variable
Gnuplot like SWP is a script language interpreter. SWP language functions could make Gnuplot and call Gnuplot automatically to generate plots in EPS (Encapsulated PostScript) format. Resulting files could be used in most of modern graphical software and \(\LaTeX\) system.
SWP could not fully eliminate invalid Gnuplot script creation, in this case knowledge of Gnuplot could be useful to detect why EPS file was not created and fixing SWP sctipt.
Calling Gnuplot is realised through command shell — gnuplot command. This may be changed by altering
SWP saves Gnuplot script to file with .plt extension and call Gnuplot to run this script. Is the file already exists, SWP checks if new script differs from older one and call Gnuplot only if a difference is found.
Plot making process could be divided into two stages. First is to create plot elements and second is to place them onto plot.
Lines are main plot elements. Lines could be a plot of real function or dotted set plot. For example, plot of dotted set could be created (each point of set is one dot on the plot). Another example is to plot tabulated function using straight line segments between points. Or to plot histogram, etc.
Arrows is additional plot elements. They are straight line segments or vectors or two-end arrows. Ends coordinated are entered manually originated from plot or paper coordinate system.
Plots are created by plot function.