plot
Contents: Description, Arguments, Usage, Examples, Images, Related Functions Supported Under Version: > 1.73 Current Davinci Version: 2.27 64-bit Safe: No
Description WARNING! This function has changed from plot() version 1.72 and used to be called vplot(). This is the graphing function of Davinci. Through the use of this function, data may be altered, formatted and exported to the Gnuplot graphing engine. Some of the options in Davinci do not exist in Gnuplot and many, many advanced features of Gnuplot are not provided in this function. Features of this function include: plotting objects with independent and non-matching x-axes, ignore values, specifying line widths, colors and style, intelligent labels, and a shortened syntax. Advanced features: 'ignore above', 'ignore below', errorbars for x, y and xy, printing all gnuplot files to a directory in gnuplot format for professional graph making, handling input structures containing standard elements (.data, .label, .xaxis, .axis, .width, .color, .style)
Arguments and Return Values Arguments: numeric arrays and gobs of other optional stuff, look below Return Value:optional string containing the often lengthy Gnuplot command. GnuPlot is launched and displays graph.
Usage Syntax: plot(object1[, label=STRING][, axis=x/y/z][, xaxis=VAL][, ignore=VAL][, width=INT][, color=INT][, style=INT][, separate=INT][, object2][, ...])
These object-specific keywords must immediately follow the object on which they are meant to operate. They can be placed in any order whatsoever after the object. The basic object-specific keywords are: label, xaxis, axis, ignore, width, color, style, separate.
These global keywords, which must have a capital first letter, may be placed anywhere in the argument stream, even before the first object.
xaxis:(x) A numeric array to use as the x-axis for one object. axis:(a) A direction to define the axis of plotting for one object. Syntax does not need to be a string in quotes. Ex: axis=y not axis="y" label:(l) A string to use as the name of the plot object. Does not need to be specifically called. An undefined string in the command buffer will be used as the label. ignore:(ig) A number that will not be plotted if it is found in the object. This would result in a break in the graph like in the image below. width:(w) A number > 0 that defines the thickness of the plot. color:(c) A number > -2 that defines the color of the plot. style:(st) One of the following: lines, points, linespoints, dots, steps, impulses, boxes, xerrorbars, yerrorbars, xyerrorbars, xerrorlines, yerrorlines or xyerrorlines. Used like axis. Ex. style=lines. not style="lines". separate:(se) Any number to tell gnuplot to separate each vector of your object and plot them with their own color.
iabove: (ia) An "ignore above" y-value above which no data points will be plotted. ibelow: (ib) An "ignore below" y-value below which no data points will be plotted. ixabove: (ixa) An "ignore x above" value on the x-axis above which no data points will be plotted. ixbelow: (ixb) An "ignore x below" value on the x-axis below which no data points will be plotted. errorbars: (e) Errorbar values for x, y or xy. See examples for format and usage. smooth: (sm) Gnuplot will fit curves to your data automatically. Options are: csplines or bezier. Syntax is similar to the keyword style. offset: (o) An optional y-value offset applied cumulatively to each successive plot. (Good for visually separating plots.) dir: (d) Designates a text string containing the path where Gnuplot files will be written and saved for future use outside of davinci gcommand: (g) A boolean flag to print the full Gnuplot command to the screen.
See Example Using structures for usage.
Examples dv> lr = ascii("low_res.txt",format=float) Apparent file size: 2x11x1 2x11x1 array float, bsq format [88 bytes] dv> hr = ascii("high_res.txt",format=float) Apparent file size: 2x72x1 2x72x1 array float, bsq format [576 bytes] dv> plot(hr[1], xaxis=hr[2], label="High Resolution", ignore=-666, style=linespoints, width=2, color=3, lr[1], xaxis=lr[2], label="Low Resolution", width=7) or equivalently: dv> plot(hr[1], x=hr[2], "High Resolution", ig=-666, s=linespoints, w=2, c=3, lr[1], x=lr[2], "Low Resolution", w=7) will both result in the graph below. Advanced Examples Example using style, width and color Example using dir and gcommand
|
DavinciWiki Mini-Nav Bar Contents
Contact Developers
All other topics
Recent Core Changes Modified On: 11-11-2013 |