Skip to main content

Transforming the understanding
and treatment of mental illnesses.

Celebrating 75 Years! Learn More >>

Laboratory of Neuropsychology Laboratory of Neuropsychology (LN)

Creating, Printing and Saving Plots

There are several ways to tellMatOFFto create a plot based on the current data file and search specifications. The simplest way is to issue aShowcommand. Normally, this command will create one drawing of your data. The drawing may have many components, including rasters, a histogram, etc. The drawing is called a "plot" and the specification of the components is called a "layout". TheShowcommand can create multiple plots of the same data if multiple layouts are specified with theDisplaycommand. TheDisplaycommand is discussed in later sections.

TheOld plotcommand is similar to theShowcommand, but it allows you to specify which plot window will receive the plot if you have multiple windows open on the screen.New plotis also similar toShow, but it creates a new plot window before doing any drawing.Old plot nextis likenew plot; it adds 1 to the current plot number.Nextplotsets the plot number, likeOld plot, but does not actually produce a plot. Eraseclears the current plot window for reuse.

Plots can also be created automatically. The Autoupdatecommand will causeMatOFFautomatically re-plot the current data each time a layout parameter is changed.Manualupdateturns off that feature.

Preventing Plots

MatOFFcan do a statistical analysis is the current data each time a plot is created (seeExporting Results). There may be times when you may want the statistical results, but not the screen plots. The commandSet plot noshowwill disable screen plots.Set plot showwill re-enable screen plots. The commandsHide plotandcan be used as synonyms.

Layouts

The plots produced byMatOFFcan include spike rasters, analog traces, text, etc. The "layout" determines which elements are plotted, and how they are arranged on a page.MatOFFcan hold 10 different layouts in memory at one time, but only one layout is active. TheLayoutcommand determines which layout is active. TheDisplaycommand determines which layout(s) to use when aShowcommand is given.

Here are some example layout commands:

raster show
raster ypos 25
raster size 1
raster separation 4

These commands set up the display of spike rasters. The parameters in each command fine-tune some feature of the raster display. See

Layout Parametersfor a more complete use of these specifications.

Managing Layouts

MatOFFmaintains an internal list of 10 layouts. It is very common to simplifyMatOFFoperations by using layout number 1 for all plotting. However, the user should be aware of the ability to specify and use multiple layouts.

Only one is active at any time.Activemeans that a layout command like

raster size 1

changes the plot elements for only that layout. Here are the commands that help manage layouts.

copy<a> <b> make layout <b> exactly like layout <a>
initialize set all 10 layouts to the standard default set of layout parameters
layout<n> choose layout number <n> to be the current layout
layoutfile <filename> load a group of 10 layouts from the specified layout file
layoutsave <filename> save current group of 10 layouts to the specified layout file
<filename> only save the active layout information as a protocol file, which can be restored using theLoadcommand

The Show command and the Display List

TheShowcommand can produce several plots in a row. You can save three different views of your data to disk with a singleShowcommand using the display list and theSet plot keepcommand. Set up layout 1 with the first view, layout 2 with the second view, and layout 3 with the third view. In the simple example here, layouts 1, 2, and 3 are the same, except that the analog traces are removed from layout 2 and the raster traces are removed from layout 3:

layout 1
analog show
raster show
copy 1 2
copy 1 3
layout 2
analog noshow
layout 3
raster noshow

The following commands configureMatOFFto plot all three views of the data whenever aShow>command is issued:

display 1-3
show

The last two commands,DisplayandShowcan be combined into a singleShowcommand:

show 1-3

Multiple plots per page

MatOFFcan place from 1 to 72 plots in a single figure or printed page. TheAxis multiplotcommand divides the display figure into equal-size rectangles (panels) to make space for multiple plots. For example:

axis multiplot 4

divides the display window into 4 equal panels.

1
3 4

TheAxis subplotcommand determines which panel will receive the next plot. Here is a typical example of creating a figure with four plots.

erase
axis multiplot 4
axis subplot 1
load left_sequence
show
axis subplot 2
load right_sequence
show
axis subplot 3
load up_sequence
show
axis subplot 4
load down_sequence
show

Unfortunately, using multiple layouts with a show command (e.g., show 1-4) will not position the 4 plots on separate subplots as you might expect. A separateAxis subplotcommand is required before eachShowcommand.

TheAxis subplotcommand describes the page layout for up to 72 plots on a page.

Drawing twice on the same plot

It is possible to draw twice or more on the same plot. Use theOverplotcommand instead ofShoworOld plot.

Saving Plots to disk

ThePlotcommand saves a figure containing one or more plots, to the disk. Plots can be saved to disk automatically each time aShowcommand is given, using theSet plot keepcommand. The environmental variable GRAPHICSFORMAT selects the file format of the saved figure. See thePlotcommand for more details.

Printing Plots

ThePrintcommand sends a figure containing one or more plots to the default Windows printer. The same command also controls the orientation of the paper (portrait vs. landscape) and the paper size. Printing will try to match the color of the plots, unless color printing is disabled (withSet print nocolor). When color is disabled, all elements of the plot will be in black with a white background. At the moment the print command can only print to the default Windows printer.