Plot Control Commands

These functions control the plotting characteristics of PyDV which affect all displayed curves.

Note

< > = Required user input.

[ ] = Optional user input.

[PyDV]: = Python Data Visualizer command-line prompt.

annot

Display text on the plot at point (x, y).

[PyDV]: annot <text> <x> <y>

bkgcolor - 2.4

Change the background color of the plot, window, or both

[PyDV]: bkgcolor <[plot | window] color-name | reset>

dashstyle

Set the style of dash or dot dash lines. The python list is a list of integers, alternating how many pixels to turn on and off, for example:

[2, 2] : Two pixels on, two off (will result in a dot pattern).

[4, 2, 2, 2] : 4 on, 2 off, 2 on, 2 off (results in a dash-dot pattern).

[4, 2, 2, 2, 4, 2] : Gives a dash-dot-dash pattern.

[4, 2, 2, 2, 2, 2] : Gives a dash-dot-dot pattern.

See matplotlib ‘set_dashes’ command for more information.

[PyDV]: dashstyle <curve-list> <[...]>

dataid

Show curve identifiers if True. Alternative Form: data-id

[PyDV]: dataid <on | off>

delannot

Delete annotations from list.

[PyDV]: delannot <number-list-of-annotations>

domain

Set the domain for plotting. Using de (for default) will let the curves determine the domain.

[PyDV]: domain <low-lim> <high-lim>

              OR

[PyDV]: domain de

fontcolor

Change the font color of given plot component.

[PyDV]: fontcolor [<component: xlabel | ylabel | title | xaxis | yaxis>] <color-name>

fontsize

Change the font size of given component, or overall scaling factor.

[PyDV]: fontsize [<component: title | xlabel | ylabel | key | tick | curve | annotation>] <numerical-size | small | medium | large | default>

fontstyle

Set the fontstyle family.

[PyDV]: fontstyle <serif | sans-serfif | monospace>

geometry

Change the PyDV window size and location in pixels.

[PyDV]: geometry <xsize> <ysize> <xlocation> <ylocation>

grid

Set whether or not to draw grid lines on the graph. Default is off.

[PyDV]: grid <on | off>

gridcolor

Set the color of the grid.

[PyDV]: gridcolor <color-name>

gridstyle

Set the line style for the grid.

[PyDV]: gridstyle <style: solid | dash | dot | dashdot>

gridwidth

Set the grid line width in points.

[PyDV]: gridwidth <width>

guilims

Set whether or not to use the GUI min/max values for the X and Y limits. Default is off.

[PyDV]: guilims <on | off>

handlelength

Adjust the length of the line(s) in the legend.

[PyDV]: handlelength <length>

image

Save the current figure to image file.

[PyDV]: image <file-name> <file-type: png | ps | pdf | svg>

label

Change the key and list label for a curve.

[PyDV]: label <curve> <new-label>

labelFileNames

Change the key and list labels for all curves to append the filename.

[PyDV]: labelFileNames

latex

Use LaTeX font rendering if True

[PyDV]: latex on | off

legend

Show/Hide the legend with on | off or set legend position with ur, ul, ll, lr, cl, cr, uc, lc. Shortcuts: leg, key

[PyDV]: legend <on | off> [position]

lnstyle

Set the line style of the specified curves.

[PyDV]: lnstyle <curve-list> <style: solid | dash | dot | dotdash>

lnwidth

Set the line widths of the specified curves. A line width of 0 will give the thinnest line which the host graphics system supports.

[PyDV]: lnwidth <curve-list> <width>

marker

Set the marker symbol and scale (optionally) for scatter plots. You can also use any of the matplotlib supported marker types as well. See the matplotlib documentation on markers for further information.

[PyDV]: marker <curve-list> <marker-style: + | . | circle | square | diamond> [marker-size]

minorticks

Minor ticks are not visible by default. On will make the minor ticks visible and off will hide the minor ticks.

[PyDV]: minorticks <on | off>

movefront

Move the given curves so they are plotted on top.

[PyDV]: movefront <curve-list>

range

Set the range for plotting. Using de (for default) will let the curves determine the range. Shortcut: ran

[PyDV]: range <low-lim> <high-lim> | de

style

Use matplotlib style settings from a style specification. The style name of default (if available) is reserved for reverting back to the default style settings.

[PyDV]: style <style-name>

ticks

Set the maximum number of major ticks on the axes.

[PyDV]: ticks <quantity> | de

title

Set a title for the plot

[PyDV]: title <title-name>

update

Update the plot after each command if True.

[PyDV]: update on | off

xlabel

Set a label for the x axis

[PyDV]: xlabel <label-name>

xlogscale

Set log scale on or off for the x-axis. Alternative Form: x-log-scale, Shortcut: xls

[PyDV]: xlogscale <on | off>

xtickcolor

Set the color of the ticks on the x-axis. Default is to apply to major ticks only.

[PyDV]: xticks <de | color> [which: major | minor | both]

xticks

Set the locations of major ticks on the x-axis

[PyDV]: xticks de | <number> | <list of locations> | <list of locations, list of labels>

xtickformat

Set the format of major ticks on the x axis. Default is plain.

[PyDV]: xtickformat <plain | sci | exp | 10**>

xticklength

Set the length (in points) of x ticks on the axis. Default is apply to major ticks only.

[PyDV]: xticklength <number> [which: major | minor | both]

xtickwidth

Set the width (in points) of x ticks on the x axis. Default is to apply to major ticks only.

[PyDV]: xtickwidth <number> [which: major | minor | both]

ylabel

Set a label for the y axis

[PyDV]: ylabel <label-name>

ylogscale

Set log scale on or off for the y-axis. Alternative Form: y-log-scale, Shortcut: yls

[PyDV]: ylogscale <on | off>

ytickcolor

Set the color of the ticks on the y-axis. Default is to apply to major ticks only.

[PyDV]: ytickcolor <de | color> [which: major | minor | both]

ytickformat

Set the format of major ticks on the y axis. Default is plain.

[PyDV]: ytickformat <plain | sci | exp | 10**>

yticklength

Set the length (in points) of y ticks on the y axis. Default is to apply to major ticks only.

[PyDV]: yticklength <number> [which: major | minor | both]

ytickwidth

Set the width (in points) of y ticks on the y axis. Default is to apply to major ticks only.

[PyDV]: ytickwidth <number> [which: major | minor | both]

yticks

Set the locations of major ticks on the y axis.

[PyDV]: yticks de | <number> | <list of locations> | <list of locations, list of labels>