Plot Manager (PLOTMAN)


Table of Contents    
        Overview   Calling PLOTMAN from the Command Line
        PLOTMAN Defaults    
        Printing from PLOTMAN    
        File Pull-down Menu    
            Configure Plot File   Snapshots
            Create Plot File      PLOTMAN Snapshot
            Select Printer      Image Default Options Widget
            Configure Print Plot Output      Image Options Widget
            Print Plot      XY Plot Options Widget
            Export Data      UT Plot Options Widget
            Stop (for debug purposes only)      Spectrogram Plot Options Widget
            Exit     Multi-Panel Options Widget
        Plot_Control Pull-down Menu    
           Image Display Options    
            Image or Spectrogram Profiles    
            Image Flux    
            Image Colors    
            XY Plot Display Options    
            Spectrogram Plot Display Options    
            Spectrogram Integrate Over Y    
            Zoom to Previous Zoom Limits    
        Window_Control Pull-down Menu    



Plot Manager (PLOTMAN) is a generic plot handling package.  PLOTMAN provides access to standard IDL plotting options for any data set.  Options for zooming, log scale, character size, image representation, and much more are available.  Also standard output choices such as printing the plot, creating a plot file in one of several plot formats, or printing the data itself in a text file are available.   PLOTMAN features can be incorporated into another widget program, as in the HESSI GUI,  OSPEX, and the GOES workbench, or PLOTMAN can be run standalone.  In standalone mode, since PLOTMAN is generic, once the data set is defined in a PLOTMAN instance, PLOTMAN offers no control over the data itself, only its representation.

PLOTMAN handles four types of plot data - xy plots (line plots with anything other than time on the x axis, e.g. spectra), ut plots (x axis is time), image plots, and spectrogram plots.

Most options are accessed through the pull-down buttons at the top of the PLOTMAN window.  In addition, you can right-click in any plot to display the coordinates of a point, or left-click and drag a box to zoom in on any plot. A single left-click with no dragging will restore the original plot limits.

Use the options under the Plot_Control pull-down menu to alter the appearance of the plot.  When more than one panel is displayed in the main widget, clicking on a panel makes that panel the active panel (it will be outlined in red when it is active). Once a panel is selected, then all plot manipulation and save and print options operate on that panel only. If you select 'Current Panel / New PLOTMAN Window' under 'Window_Control', the panel will appear in a new PLOTMAN instance that is entirely independent from the first PLOTMAN widget.

If PLOTMAN is called with more than one data set, then the plots are stored as separate panels and can be viewed separately or simultaneously.  The 'Window_Control' pull-down menu from the top menu bar shows the panels that are stored, and also has some controls to allow you to see multiple panels simultaneously. The 'Configure' button allows for customization in displaying multiple panels. In addition, each individual panel has a control menu to close, delete, or maximize that panel, or to display it in a separate window.

(Back to Table of Contents)

PLOTMAN Defaults

PLOTMAN (as of November 2007) allows you to control plot options as follows:

  1. To set persistent plot preferences,  click the 'Set Plot Preferences' button under File, and select from the menu to set XY, UT, Image, or Spectrogram plot preferences.
  2. To set plot preferences for future plots in this PLOTMAN session only (i.e., not in the next PLOTMAN session), follow the same procedure as above, but unset the 'Write to File' option.
  3. To change plot options for existing plots, click 'Multi-Panel Options' in the Window_Control pull-down menu.

(Back to Table of Contents)


Printing from PLOTMAN

The printers available for use by PLOTMAN are listed when you click the File / 'Select Printer...' button. Printers are defined differently on UNIX and Windows.


The /etc/printcap (DEC, Linux) or /etc/printers.conf (Sun) file is examined to find the list of available printers. If this file doesn't exist, then the program checks these environment variables for printer definitions:



On Windows the program checks these environment variables for printer definitions:


You must first set up the printers as shared and then you must define one or more of the variables listed above.

To set up printer sharing:

You should define at least PSLASER and PSCOLOR in your personal IDL startup file, by adding lines like the following:

set_logenv, 'PSLASER', '\\lotus\laser-g62'
set_logenv, 'PSCOLOR', '\\lotus\tek-560'

replacing lotus with your computer name and laser-g62 and tek560 with the share names of the printers.

(Back to Table of Contents)


File Pull-down Menu

Set Plot Preferences

This option is described above in PLOTMAN defaults.

Configure Plot File
Create Plot File

There are options to configure and create a PostScript, TIFF, PNG, or JPEG file of the current plot. In the configuration widgets, most of the parameters are self-explanatory except:

The default location for the output file is the current directory (type pwd at the IDL prompt to see what that is). The default file name is, plotman.tif, etc. The directory and the file name can be changed in the configure widget.

Select Printer

A widget lets you choose the printer that subsequent print commands will use. Refer to the explanation of how the available printers on your computer are determined.

Configure Print Plot Output
Print Plot

Printing is accomplished by creating a temporary PostScript file in your current directory called and then sending it to the printer currently selected. The file is then deleted. The configuration window is identical to the configuration window that appears when you click 'Configure Plot File' / 'PS', but the configuration options are stored separately so you can set and remember different options for printing as opposed to creating and saving a PS file.

Export Data

Write Text File

This option produces a file containing a text listing of the data that is displayed in the current plot. For images, the x,y coordinates are arranged exactly as in the displayed image (i.e. the top, left numbers in the table correspond to the top, left area of the image plot). This can produce very long text lines, but makes it possible to import easily into a spreadsheet program like Excel. The default file is called output.txt, written in your current directory, but you are given an opportunity to select the output file name and location.

Note. This option is available only for data types for which a 'LIST' method has been written. This will eventually include all of the HESSI data types, but does not currently. An error message will be displayed if the 'LIST' method is not available.

Write FITS file

This option produces a FITS file containing the data that is displayed in the current plot. Currently this is implemented only for HESSI image data. The default file name is hsi_image_yyyymmdd_hhmmss.fits in the current directory, but you are given an opportunity to select the output file name and location. This fits file contains the image data itself, and all of the control parameters that were used to reconstruct it. You can read the image back into the hessi GUI by selecting the File Input option in the image widget. Or you can read it at the command line using the hsi_image_fitsread routine (check the header of the routine for an explanation of how to call it).

Stop (for debug purposes only)

This button will be removed in future versions. It provides access to internal variables for debugging purposes.


Exit the HESSI GUI.

(Back to Table of Contents)


Plot_Control Pull-down Menu

The options under the Plot_Control pull-down menu apply to the currently selected plot panel. If multiple plot panels are showing, then the selected panel is the one you most recently clicked in (should be indicated by a red border).

Some of the options apply only to images or X vs. Y plots, and are insensitive unless that type of plot is selected.

Image Display Options

This button brings up the generic image display control widget.  Click here to see a snapshot of the widget.  There are options to change the image representation, for example to a surface or contour, to define contour levels, set character size, and more. Most of it is self-explanatory, except:

Note: This is a 'modal' widget, which means that you can interact only with this widget until you close it (you can't type anything at the command line or click in any other widget).

Image or Spectrogram Profiles

A separate plot window shows the row or column profile of the image. Move the mouse over the image to select the row or column to profile, left-click to toggle between row and column profiles, and right-click to exit the profiling option. On exit, the profile plot window will be closed.

Currently there is no way to save or print a profile plot (except by screen capture).

The X and Y coordinates of the cursor on the image and the image value are displayed at the bottom of the profile plot.

Image Flux

A widget interface pops up to allow you to define regions on the image. Click buttons to select shape to draw, and then:

When all regions are defined, click Accept and the flux in each region, as well as the total flux will be displayed in the IDL output log window and in the message window in the main GUI window. The flux is defined as the total of the all of the image values included within the region times the area of an individual pixel. Only whole pixels are included. A pixel is included if any part of it is included in the region you specify.

Image Colors

Select from the standard set of ~40 IDL color tables, as well as two additional HESSI color tables. The HESSI color tables are designed to make clear where the zero levels of the image are, so they are handled differently. With the standard IDL color tables, the range of image values is scaled to the range of colors in the color table, whereas with the HESSI color tables, the range of image values is symmetric around zero (i.e. the range [-max(abs(image)),max(abs(image))] is scaled to the range of colors in the table).

Stretching the color table forces the full color range to run from the bottom index selected to the top index selected.

A gamma correction of 1.0 indicates a linear ramp (i.e., no gamma correction). Higher values of Gamma give more contrast. Values less than 1.0 yield lower contrast.

XY/UT Plot Display Options

This button brings up the generic X vs. Y or UT plot display control widget. Click here to see a snapshot of the widget.  There are options to set linear/log, histogram style, character size, and more. Most of it is self-explanatory, except:

Note: This is a 'modal' widget, which means that you can only interact with this widget until you close it (you can't type anything at the command line or click in any other widget).

Spectrogram Plot Display Options

This button brings up the generic X vs. Y display control widget. Click here to see a snapshot of the widget.

Spectrogram Integrate Over Y

This button allows you plot the time profile of the integrated flux from the spectrogram, either over the full Y range, or over a Y range you select.


After clicking zoom button, left-click in plot window and drag to define zoom window. Click Unzoom, or single left-click in plot window (without dragging) to unzoom.

Note: You can zoom without clicking 'Zoom' button simply by holding left button down and dragging to draw zoom box.

Zoom to Previous Zoom Limits

For each type of plot (image, xy, and ut), when you zoom in, the zoom limits are saved in common. Pressing this button restores the previously zoomed limits for the current type of plot.


Restores original auto scaled limits for plot.

Note: You can unzoom without clicking 'Unzoom' button simply by left-clicking once anywhere in plot window (without dragging).


Puts a 'magnifying glass' on the plot. A box appears in the plot window. Move the box by moving the mouse. Left-click to magnify the contents of the box. Right-click to quit the magnify option.


Redraws the plot with its current plot parameters. Useful, for example, if you have right-clicked to show coordinates at different points, and you want to clear that text from the plot.

(Back to Table of Contents)


Window_Control Pull-down Menu

This pull-down menu lets you manage the panels (plots that you have already drawn) that are available in the GUI. You can restore any single panel by clicking on the description of the panel.

Click the Multi-Panel Options button for a variety of operations to perform on multiple panels.  Snapshot is here.  In the Multi-Panel Options widget you can select multiple panels to display simultaneously (in multiple smaller panels within the PLOTMAN window), or you can change plot defaults for all selected panels, show selected panels as a movie, make plot  files of selected panels, delete selected panels, and more.

When multiple plots are displayed, the panel surrounded by a red box is the active one.  After making a panel active, you can zoom (by left-clicking and dragging) or use the controls under the Plot_Control pull-down menu to modify the display options for that panel.

(Back to Table of Contents)


Calling PLOTMAN from the Command Line

Some of the data objects you work with have plotman methods.  These include the RHESSI image, spectrum, lightcurve, and observing summary objects, as well as the more generic xyplot, utplot, specplot, or map objects.  In fact, because the instrument data objects available through show_synop and vso_search/vso_prep such as eit, euvi,  and trace 'inherit' the map object, they all have a plotman method.  (You can check if your object has a plotman method by typing print,have_method(o,'plotman').  A result of 1 means you do have a plotman method.)  If you are working with one of these object classes, you can call plotman from the command line by typing (if o is your object):

o -> plotman

You can include on this call to plotman many of the keywords that apply to the IDL plot command.

Each time you call o -> plotman, a new plotman instance is created.  If you'd prefer to send all of your plots to the same plotman instance, type:

o1 -> plotman, plotman_obj=pobj   ; on the first call the plotman object (pobj) will be created and returned to you
o2 -> plotman, plotman_obj=pobj   ; on subsequent calls, the existing plotman object (pobj) will be used again
o3 -> plotman, plotman_obj=pobj

Each new plot will be saved as a separate panel.  The panels are accessible under the Window_Control button.

If you have a simple data array (image, spectrum, time profile, etc.) rather than an object with a plotman method, the best way to use plotman is to insert the data into one of these generic plot objects: xyplot , utplot, specplot, or map, and then use that object as input to PLOTMAN.  These object classes are in the gen part of $SSW - please see the header documentation in the .pro files for more information about how to call them.  These object classes are integrated well with PLOTMAN  - you can set a variety of parameters describing your data into the generic plot object, and PLOTMAN will recognize them.  (You can also put the data arrays directly into PLOTMAN without using the intermediate object, but there is less flexibility, so that is not discussed here.)

Here's a really basic example of creating an xyplot object from simple arrays:

x = findgen(100) & y = sin(x) ; create some data arrays
xy = obj_new('xyplot',x,y) ; create the xyplot object
p=plotman(input=xy,plot_type='xyplot') ; create a new instance of plotman and show the plot

If we want to add another panel to that same plotman instance, and maybe set a little more information in the xy plot object, as well as not plot as a histogram for instance:

x = findgen(100)+1 & y = [[sin(x)],[cos(x)/alog(x)]] ; now y has two 'channels'
xy2 = obj_new('xyplot',x,y)
xy2 -> set, id='Sin and cos plot for test', data_unit='Something',  dim1_ids=['sin', 'cos/log']  ;adds labeling information
p->new_panel,input=xy2,plot_type='xyplot','My second plot', psym=0, yrange=[-1,1.5]

Similarly, if you want to add an image to the same plotman instance:
image = dist(512)
m =obj_new('map')
m -> setmap, data=image
p->new_panel,input=m,plot_type='image','Third panel'  ; Adds image to plotman in panel called 'Third panel'

Then you can use Plot_Control to change options or overplot, and Window_Control to select panels.


Last updated 04 July, 2010 by Kim Tolbert, 301-286-3965