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

# Changes to Plot in J504

Plot is rewritten for J504. The following is a summary of the main changes to Plot in J504. Here, Plot1 and Plot2 are the old and new versions.

# Scaling

Plot1 drew to a notional 1000 x 1000 box that was scaled to fit the actual viewing area. This did not scale well. For example, if a plot displayed properly in a full screen window, and was then reduced to a quarter of the screen, the plot decorations typically appeared too small; and vice versa.

Plot2 draws to the actual viewing area, and should display correctly at any scale.

# Output

Plot1 was designed only for output to screen, and was not easy to output to another format.

In Plot2, the drawing is essentially independent of output. Additional outputs supported are EPS (encapsulated postscript) and PDF (Adoble portable document format). The default output is to screen if not a console session, or to PDF if a console session. The outputs to EPS and PDF use native drawing facilities. The PDF code includes Oleg Kobchenko's `bezierarc` routine.

Other output formats are available with the Image3 Addon.

For more information, see Plot Outputs.

# Styles

The default style now has a frame and grid.

User defaults can be set in file ~config\plotdefs.ijs, see Plot Options.

# Rectangle Positioning

The new or use window commands have a parameter of a rectangle.

In Plot1, these parameters were the xywh (bottom left xy, width, height) relative to the notional 1000 x 1000 box.

For example, a new window of 100 100 250 150 would have bottom left position 100 100, width 250 and height 150.

Plot2 has the following changes, that provide better control over window placement:

- the parameters are now the bottom left corner, upper right corner. The above example would now be given as 100 100 350 250.
- a position with an x suffix is in drawing units (pixels if output to screen). For example, a new window of 0 0 100x 200x is the lower left 100 x 200 pixels.
- negative positions count from the end, offset by 1, so that -101x -201x -1x -1x is the 100 x 200 pixels at the top right corner.

# Text Positioning

Text commands have a parameter of a position. In Plot1, they were relative to the notional 1000 x 1000 box.

Plot2 has the following changes:

- text commands are now relative to the current drawing window (specified by new or use).
- a position with an x suffix is in drawing units (pixels if output to screen).
- negative positions count from the end, offset by 1.

For example, following a command of:

      pd 'new 100 100 300 200'

then the following puts text centered at position 200 150 (center of the new box):

      pd 'textc 500 500 genie'

and the following puts text at position 50x 100x within the new box:

      pd 'text 50x 100x genie'

For more information, see Plot Text Commands.

# Fonts

Plot2 now support font parameters in PostScript Type 1 format.

For more information, see Plot Fonts.

# Second y axis

This is now supported, see Plot Y-Axes.

# Keys

These now work properly, see Plot Keys.

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