Difference between revisions of "Plot Commands"
Jump to navigation
Jump to search
m (→Overplots) |
|||
Line 70: | Line 70: | ||
===Plotting Arrays of [[IXTdataset_1d]]=== | ===Plotting Arrays of [[IXTdataset_1d]]=== | ||
+ | |||
+ | If a one dimensional plot command is given an array of [[IXTdataset_1d]] objects then each [[IXTdataset_1d]] will be plotted as an overplot. Their order in the array is the same as the plotting order so that | ||
+ | |||
+ | <pre>>> dl(w, optional)</pre> | ||
+ | |||
+ | is the same as | ||
+ | |||
+ | <pre>for i = 1:length(ww) | ||
+ | pl(w(i), optional) | ||
+ | end</pre> | ||
+ | |||
+ | |||
+ | '''''EXAMPLE:''''' | ||
+ | |||
+ | If w is a 4 element array of [[IXTdataset_1d]] objects then | ||
+ | |||
+ | <pre>>> acolor('red', 'blue', 'green') | ||
+ | >> dl(w)</pre> | ||
+ | |||
+ | Gives the following result | ||
+ | |||
+ | [[image:Colours.png|center|400px|Plot of array of IXTdataset_1d objects]] | ||
===Plotting Arrays of [[IXTdataset_2d]]=== | ===Plotting Arrays of [[IXTdataset_2d]]=== |
Revision as of 10:46, 19 March 2008
The main purpose of the graphics package is to plot graphs. Several different commands exist to facilitate this.
One Dimensional Plots
Plot Types
Images of the one dimensional plot types can be seen here.
Command | Plot Type |
---|---|
dl | Line Plot |
dm | Marker Plot |
de | Errorbar Plot |
dh | Histogram Plot |
dp | Marker with Errorbars Plot |
dp | Marker and Lin with Errorbars Plot |
Syntax:
>> dh(w, 'property', value, 'property2', value2,...)
where w is a dataset and 'property' and value define property-value pairs. See the functions for a list of properties that can be set.
Overplots
If an overplot command is used, then the next plot will appear on top of the plot in the relevant plot window.
Command | Plot Type |
---|---|
pl | Overplot Line |
pm | Overplot Marker |
pe | Overplot Errorbar |
ph | Overplot Histogram |
pp | Overplot Marker with Errorbars |
pp | Overplot Marker and Line with Errorbars |
Plotting Arrays of IXTdataset_1d
If a one dimensional plot command is given an array of IXTdataset_1d objects then each IXTdataset_1d will be plotted as an overplot. Their order in the array is the same as the plotting order so that
>> dl(w, optional)
is the same as
for i = 1:length(ww) pl(w(i), optional) end
EXAMPLE:
If w is a 4 element array of IXTdataset_1d objects then
>> acolor('red', 'blue', 'green') >> dl(w)
Gives the following result