How Plots Work

This topic describes operations on plots. For operations in plots (that is, plot construction for the purpose of model visualization), see the section on the i Plot pane. Review of the i plot commands is also of use.

Create a Plot

Multiple methods are available to create a plot. The first two below are available in any program context; the latter two are available in specific contexts, as noted.

  • File -> New Plot… command from the File menu.

  • Ctrl + Shift + N from the keyboard.

  • plot create at the command prompt in the i Console pane.

  • the new plot button ( newplot ) on the toolbar when an existing i Plot pane is active.

Hide and Show a Plot

Hiding a plot removes it from view without deleting it (closing the plot does that, see below). To hide a specific plot, press the hide button ( phide ) on its title pane. This is the only mechanism for hiding a plot. To return the hidden plot to view, select it from the i Documents menu. Plots are listed on the menu by their plot name. This is the only mechanism for showing a hidden plot.

Name and Rename a Plot

The initial name given to a plot will depend on the mechanism used to create it. If the File -> New Plot… command is used, the plot will be named automatically (“Plot#”, where # is the next available index number, given the existing plot names). If the plot create command is used, a string sname may be supplied optionally to give it a specific name; if the keyword is omitted, the default automatic naming system will be used.

Renaming a plot may be done as follows.

  • File -> [plotname] -> Rename… (where [plotname] on the i File menu is the name of the plot, as shown on the plot’s title bar).

  • Right click anywhere in the i Plot pane, and choose Plot -> Rename….

  • If the plot’s pane is part of a tabbed set, right click on the tab label and choose Rename….

  • Rename the current plot with the command plot rename s; or rename any plot with plot s rename sNew .

In the first three cases, a dialog will be shown allowing the user to specify a new name for the plot.

Close a Plot

To close a plot, press the close button ( pclose ) on its title bar. Warning: closing a plot deletes it altogether. It cannot be restored or returned to view. If the intent is merely to hide the i Plot pane from view, use hide (see above).

Save a Plot

Any open or hidden plot in the program is saved with the project, and is restored with the project when the project is opened in the program. There are two methods to save a plot file:

  • from the “Save” button ( save ) on the toolbar of the plot to be saved

  • from the File —> [plot name] —> Save As... menu command (where [plot name] will be the name of the active plot, as shown on its title bar)

Export a Plot

  • Right click on the plot, select Export ‣ Data File …

  • Select File ‣ [plotname] ‣ Export ‣ Data File… from the main menu

  • Use the “Export Plot” button ( exp — with the selection “Data File…”) on the i Plot pane toolbar

Plots may be exported as graphics files (bitmaps) or as data files. If exported as a data file, the file includes all keywords associated with the switches assigned interactively in the user interface. Note that after export, the resulting data file is automatically opened in an i Editor pane for review, and is automatically included in the project.