PLOTMAN METHODS

Kim Tolbert, 1-Oct-2012

Note: This is not a complete list of functions and procedures.  It is a work in progress.

In the following examples, p is the plotman object reference.

PLOTMAN FUNCTIONS 

PLOTMAN method call Returned value
z = p->get(/xyz) Value of xyz control parameter  (any of parameters in plotman_plot_control__define or in plotman properties (list at bottom of plotman__define)
current_panel_number = p->get(/current_panel_number) Current panel number
current_panel_desc = p->get(/current_panel_desc) Current panel description
current_panel_struct = p->get(/current_panel_struct) Structure with all of the information for the current panel, e.g.

help,current_panel_struct

** Structure <17e07da0>, 6 tags, length=9464, data length=9394, refs=3:
W_DRAWBASE LONG 6489
W_DRAW LONG 6490
WINDOW_ID INT 38
PLOT_CONTROL STRUCT -> PLOTMAN_PLOT_CONTROL Array[1]
SAVED_DATA STRUCT -> PLOTMAN_SAVED_DATA Array[1]
DESCRIPTION STRING 'efz20020212.214810 SOHO EIT 195 12-Feb-2002 21:48:10.580 (14:04:09)'

panel = p->desc2panel(panel_desc) Pointer to panel structure matching panel description

Optional keywords:
; number - if set, then returns number of panel instead of pointer to panel structure.
; all - if set, and number is set, then returns all panel numbers that match description passed in.
; (all has no effect if number is not set.)
; latest - if set, returns most recent panel matching description. Otherwise returns first one found.
; strip_time - if set, remove panel creation time from panel descriptions before checking

desc = p->get(/all_panel_desc) String array containing the panel description for all panels.
panel_types = p->get(/all_panel_plot_type)
 
String array containing the plot type for all panels: image, xyplot, utplot, or specplot
panels = p->get(/panels) Linkedlist object that contains all the information for all the panels.  Use get_count method to see how many panels are stored, get_item method to get info for a panel, e.g.

print, panels->get_count()
panel2 = panels->get_item(2)
help,*panel2

** Structure <17e07650>, 6 tags, length=9464, data length=9394, refs=1:
W_DRAWBASE LONG 6479
W_DRAW LONG 6480
WINDOW_ID INT 36
PLOT_CONTROL STRUCT -> PLOTMAN_PLOT_CONTROL Array[1]
SAVED_DATA STRUCT -> PLOTMAN_SAVED_DATA Array[1]
DESCRIPTION STRING '20120220_110000_s4c1B.fts STEREO_B SECCHI COR1 0 20-Feb-2012 11:00:41.222 (14:03:42)'

panel_times = p->get_panel_times(panel_numbers) Time intervals for each panel specified.

panel_times = p->get_panel_times([2,3,4])
ptim,panel_times

20-Feb-2012 11:00:41.222 20-Feb-2012 11:00:42.922
20-Feb-2012 11:00:50.223 20-Feb-2012 11:00:51.922
12-Feb-2002 21:48:10.580 12-Feb-2002 21:48:23.178

axis = p->getaxis( [/ut, /xaxis, /yaxis) Axis requested.  Use one of these keywords: /ut, /xaxis, /yaxis.  This doesn't work for all saved object types (like map?).

PLOTMAN Procedures

0->set,xyz=value Set plotman parameter xyz to value.
p->select If currently selected panel is valid, then sets and shows the window corresponding to that panel, and restores the plot control for that panel.  If you want to add to a plot or replot it, you must call select first.
p->plot Plot currently selected panel.  Can pass in any values stored in plot_control as keywords.
p->unselect Unset focus and plot options from current panel (basically call wset,-1 and cleanplot) so that any non-plotman plot a user draws does not show up in plotman window, and has a default set of plot parameters.
p->show_panel, panel_numbers=panel_numbers Display panels with numbers panel_numbers in plotman.  Optional keywords:

; maximize - display panel panel_number
; p2x2 - display first four panels 2 across, 2 down
; showall - show all panels
; nacross - number of plots to show in x direction
; all_1across - stack plots, so only one plot in x direction
; lineplots_1across - always show lineplots (xy, ut) using full width, i.e. one plot in x direction
; Depending on how many panels to show, it figures out how big each panel it is going to show
; should be, resizes the draw widget, and displays it.

p->delete_panel, panel_number=panel_number Delete panel pnael_number.  Optional keywords:

current - if set, delete current panel
all - if set, delete all panels

p->reset_panel_pc, struct, panels=panel_mask Modify the plot control structure saved in panels specified by panel mask (i.e. panel_mask is an array of 0s and 1s, to change fourth panel, call with panels=[0,0,0,1])
struct is a structure containing the items in plot control to change.
For example to change the color table to table 5 for panels 0,1,2:
  p->reset_panel_pc, {colortable: 5}, panels=[1,1,1]
Or to change the red,green,blue arrays to prefilled arrays in r,g,b:
  p->reset_panel_pc,{red: r, green:g, blue: b}, panels=[1,1,1]
   

To get the data object, dobj, stored in a panel in plotman (first panel in this example):

panels=p->get(/panels)
p1 = panels->get_item(1)
saved_data = (*p1).saved_data
dobj = *saved_data.data