>> << Ndx Usr Pri Phr Dic Rel Voc !: wd Help User

# Plot Commands

#### Summary

reset | reset plot
sub,endsub | create sub window. All plots are drawn in sub windows. If there is no sub command, the sub window is taken to be the full plot area.
new,multi | start plot definition. new starts a single plot, multi starts a multiplot.
use | set the current plotting area.
rule,text,textc,textr | draw rule and text
show,isi,eps,pdf | create and output plot
save,clip,print | copy plot to file, clipboard, printer

#### Drawing Commands

reset [parent] reset plot with optional parent window id.

For example:

       pd 'reset'

sub shape, endsub. Command sub starts a sub plot with given shape, sets plot defaults. Used for creating one or more plot windows. If sub is not used, the plot window is the available area.

The command is recursive - each call to sub starts a new sub plot in the existing window. Use command endsub to end a sub plot and return to the previous window.

For an isigraph plot, the default window is the full area of the isigraph control, which itself defaults to 480 x 360 pixels. For EPS and PDF plots, the default window depends on whether there is an active isigraph window displaying the current plot. If so, the window size is the same as the isigraph window, otherwise it is 0 0 480 360.

For example, create a new sub plot window with xy position 100 100, and of size 400 by 600:

       pd 'sub 100 100 400 600'

multi shape starts a multiplot with the given shape. See MultiPlots.

new [window] starts a new plot with an optional window definition, sets plot defaults. Use to set initial values, and when displaying multiple plots within the current sub window.

use window change window, leaving option settings unchanged. This does not restore plot defaults.

To draw several plots using the same options to a single sub window, start with pd 'new' for the first plot, and then pd 'use' for the subsequent plots.

[options] sets plot options. See Plot Options.

For example:

       pd 'backcolor white; frame 1'

[data] sets plot data. See Plot Data.

For example:

       pd */~i:20

rule arg draw line.

text, textc, textr arg text left aligned, centered, right aligned.

Argument is x y text, where x y are coordinates relative to the current window.

For example, the following writes the text "J Graphics" centered at position 500 950:

       pd 'textc 500 950 J Graphics'

See also Plot Text Commands.

# Output commands

show [opts] display plot using the default output.

Output is PDF if running J console, otherwise isigraph. Options are those for PDF or isigraph as appropriate.

eps [file w h] display plot in EPS format.

The file defaults to ~temp\plot.eps. The [w h] is the EPS bounding box size, and defaults to the active plot window size in pixels, or 480 360 if none.

isi [w h] display plot in an isigraph window.

The [w h] are the pixels, and default to 480 360.

pdf [file w h] display plot in PDF format.

The file defaults to ~temp\plot.pdf. The [w h] is the PDF bounding box size, and defaults to the active plot window size in pixels, or 480 360 if none.

See also Plot Output.

# Copy commands

The following commands copy an isigraph window, and require that an isigraph plot is already created. Note that to run these commands silently without first displaying the isigraph window, set option visible to 0.

clip copy isigraph plot to clipboard.

print print isigraph plot.

save type [options] save isisgraph plot to file. Several file types are supported, most of which require that the image3 addon be installed.

In each case, a file name is optional. If not given, the file is ~temp\plot.ext, where ext is the file type. For example, the default bmp file is `~temp\plot.bmp`.

Built-in file types:

> save bmp [file] save isigraph plot as a bitmap file.

> save wmf [file] save isigraph plot to file in wmf format.

Requiring image3 Addon:

> save jpg [file|quality] save isigraph plot to file in jpeg format. The quality is a percentage, and defaults to 100 (highest quality).

> save pgm [file] save isigraph plot to file in pgm format.

> save png [file|compression] save isigraph plot to file in png format. The compression is a number from 0 to 9, and defaults to 9 (highest compression).

> save ppm [file] save isigraph plot to file in ppm format.

> save tga [file] save isigraph plot to file in tga format.

>> << Ndx Usr Pri Phr Dic Rel Voc !: wd Help User