pplot
Contents: Description, Arguments, Usage, Examples, Images, Sub-Functions, Related Functions, Source Supported Under Version: > 1.11
Description Plot one or more objects, with many options. Excellent for making spectral plots. As of version 1.04 pplot() now uses plot to handle multiple x-axes. See pplot_tutorial and Plotting Spectra with pplot for more examples.
Arguments and Return Values Arguments: numeric arrays and strings Return Value: none. GnuPlot is launched and displays graph.
Usage Syntax: pplot({data1, data2, ...}, {color1, color2, ...}, {label1, label2, ...}, xaxis=xaxis, xlabel='string', ylabel='string', plot_title='string', key='string', date=1, x1=val, x2=val, y1=val, y2=val, ignore=val, noplim=1, linespoints=1, lw=val, [stack = FLOAT] [wave=1 OR cm=1], emiss=1, [tes=1 OR mtes=1 OR themis=1 OR lab1=1], pdf='filename', portrait=1, font_size=val, print=1, mono=1) Only data is required. All other arguments are optional.
{data1, data2, ...} is a structure of data elements to plot. Each data element can be a vector or array. Data elements can be a single standard ASU structure with fields called data, label, and xaxis that are used appropriately. Braces {} can be omitted if only plotting 1 variable; see examples. pplot prefers having data to be plotted in z-axis (same as xplot 'axis=z'), but it will understand any one-dimensional input.
1 red 2 green 3 blue 4 magenta 5 cyan 6 brown 7 yellow-orange (brighter orange) 8 red-orange (darker orange) After 8, the colors repeat, so 9 is red, 10 is green, and so on.
It doesn't matter if labels are input before colors. pplot can tell the difference, based on the data types. pplot({data1, data2}, {"Label 1", "Label 2"}, {color1, color2}) is the same as pplot({data1, data2}, {color1, color2}, {"Label 1", "Label 2"})
pplot({data1, data2, data3}, {"Label 1", "Label 2", "Label 3"}, xaxis={x1, x2, x3}) pplot will automatically resample your data and plot with a common x-axis. stack = f offsets every plot from its predicesor by f (use carefully) Labels: xlabel = "string for x-axis label" ylabel = "string for y-axis label" plot_title = "string for plot title" key = 'top bottom left right outside below' (can use several as appropriate) or key = 'x, y' in plot x, y units. (e.g. key='1300, .92') date = 1 to include date and time in plot title
x1 = min x for plot range x2 = max x for plot range y1 = min y for plot range y2 = max y for plot range ignore = user-supplied y value that will not be plotted (useful if some values in spectrum are 0 and you don't want a lot of vertical lines) noplim = 1 Don't change plot limits inside pplot
linespoints = 1 to display markers at each data point lw = line weight/width (default is 3)
wave = 1 to make standard Wavelength/Wavenumber X-axis (wavelengths in microns along the bottom x-axis, wavenumbers in cm-1 along the top x-axis) cm = 1 to make standard Wavenumber/Wavelength X-axis (wavenumbers in cm-1 along the bottom x-axis, wavelengths in microns along the top x-axis) emiss = 1 to make standard Emissivity Y-axis (displays y-values ranging from 0.80 to 1.01; equivalent to y1=0.80 and y2=1.01) tes = 1 to make standard TES plot (like wave=1, with x range from 200/cm to 1700/cm) mtes = 1 to make standard Mini-TES plot (like wave=1, with x range from 400/cm to 1800/cm) themis = 1 to make standard THEMIS plot (like wave=1, with x range from 600/cm to 1500/cm) lab1 = 1 to make standard ASU lab1 plot (like wave=1, with x range from 200/cm to 2000/cm)
pdf = 'filename' Basename for output of .ps file portrait = 1 to make a portrait plot (default is landscape) font_size = point size for axes and key labels in output file (default is 22) print = 1 to print directly to your default printer mono = 1 for black and white plot (.ps only)
Examples See pplot_tutorial for sample cases. dv> ASU_spec 170x923x1 array of double, bsq format [1,255,280 bytes] dv> ASU_head Text Buffer with 170 lines of text 1: 456 Actinolite 2: 603 Aegirine (aka Acmite) 3: 438 Albite 4: 454 Albite 5: 560 Albite 6: 462 Almandine 7: 568 Andalusite 8: 434 Andesine 9: 561 Andesine 10: 498 Anhydrite dv> ASU_wvn 1x923x1 array of double, bsq format [7,384 bytes] dv> pplot({ASU_spec[92,],ASU_spec[150,]}, {ASU_head[,92],ASU_head[,150]}, xaxis=ASU_wvn, cm=1, emiss=1, plot_title="Spectra", key="bottom right", ylabel="Emissivity", lw=1)
|
DavinciWiki Mini-Nav Bar Contents
Contact Developers
All other topics
Major Sub-Functions
Related Functions
Recent Library Changes Created On: 01-10-2008 |