casa  $Rev:20696$
Public Member Functions | Public Attributes | Private Attributes
casa::PlotOptions Class Reference

Classes to hold Plot Options. More...

#include <PanelParams.h>

List of all members.

Public Member Functions

 PlotOptions ()
 Constructor.
 ~PlotOptions ()
 Destructor.
Bool reset ()
 Reset to defaults.
String print ()
 Return a string of current values to print (for debugging)
Vector< StringvalidateParams ()
 Validate Current entries Returns 2 Strings, Errors and Warnings.
String fillFromRecord (Record &rpop)
 Fill entries from a record.
PlotOptionsoperator= (PlotOptions &inplop)
 operator= : copy semantics
Int getParsedParams (Int &timeplot, Int &plotcolour, String &pyplotsym)
 To allow PanelPArams to get access to some private variables.

Public Attributes

Vector< IntPanelMap
 Layer Independant Plot Parameters.
Vector< DoublePlotRange
 default : [].
Vector< BoolPlotRangesSet
 default : [].
String TimePlotChar
 default : 'o' 'o' : off -> no time formatting 'x' : time formatting for x axis 'y' : time formatting for y axis 'b' : time formatting for x and y axes
Bool ColumnsXaxis
 default : True : To use with CrossPlot.
Bool OverPlot
 Default : False True : This plot must sit on top of existing plots False : This plot will be a fresh plot clearing away all existing layers.
Bool ReplaceTopPlot
 Default : False True : OverPlot=False will replace only the top layer, and will not clear away all existing layers.
Bool RemoveOldPanels
 Default : True True : Make TablePlot mimic the matplotlib behaviour of automatically clearing panels when a new panel overlaps on it.
Double FontSize
 Default : 12 .
String XLabel
 X axis label.
String YLabel
 Y axis label.
String Title
 Title For multiline labels, beware of newline characters.
Double WindowSize
 Default : 8.0 ( in cm ).
Double AspectRatio
 Default : 1.0 .
TPConvertBaseConvert
 Default : NULL If left as NULL, it gets replaced by a pointer to TPConvertVase.
TPGuiCallBackHooksCallBackHooks
 Default : TPGuiCallBackHooks instance.
Bool DoScalingCorrection
 Default : False True : If a Scalar or Vector reduction has been done using MEAN(), the values are rescaled to account for the number of flagged values being averaged by TaQL.
String SeparateIter
 Default : 'none' 'row' : iteration plots from multiple TaQLs can be run parallely.
Bool HonourXFlags
 Default : False ( only for CrossPlot ) False : Compute the average x axis value as the middle of the range being avgd True : Compute the average x axis value accounting for flagged cell rows/cols.
Vector< StringLocateColumns
 Default : [] This is the list of Table columns that will get sent into the "locate" function when triggered by the GUI.
String PlotSymbol
 Layer Dependant Plot Parameters.
String ColourString
 Default : '' .
Vector< StringPointLabels
 Default [] : If specified, it will apply to the first N plotted points.
Double MarkerSize
 Default : 10.0 .
Double LineWidth
 Default : 2.0 .
String MultiColour
 Default : 'none' 'cellrow' : Cell rows get different colours 'cellcol' : Cell cols get different colours 'both': rows and cols get different colours 'none': rows and cols get the same colour.
Bool TableMultiColour
 Default : True True : When multiple Tables are sent in simultaneously into TablePlot, they go to different Layers and automatically increment colours.
Bool ShowFlags
 Default : False True : Plot flagged points in purple False : Plot unflagged points in specified colour (example : Do an overplot with False and then True, to see flagged and unflagged points in different colours.)
String FlagVersion
 Default : "main" Name of the flag version to use while plotting If it doesn't find this name, it uses "main".
Int SkipNRows
 Default : 1 Start with the first point, and then plot only if npoints % SkipNRows == 0.
Int AverageNRows
 Default : 1 No averaging.
String FlagExt
String Connect
 Default : 'none' : no points are connected by lines.
Int NColours
 Allowed, predefined colours.
Bool useLayerColor
Vector< StringColourList
 A long list of supported colour names.
String pylabcolourstring
Bool doAverage
 for chan/time averaging
Matrix< IntChanMap
Matrix< IntRowMap
String MSName
String spwExpr

Private Attributes

Int TimePlot_p
 0:1:2:3 -> 'o','x','y','b'
Int PlotColour_p
 an Int for the colour part of plotsymbol
String PyPlotSymbol_p
 just the plotsymbol (without colour)
Bool ConvertIsLocal_p
 Has the 'Convert' TPConvertXXX been created inside PlotOptions, or by the user ? True : created inside here => needs to be deleted inside here too, during cleanup.

Detailed Description

Classes to hold Plot Options.

Prerequisite

Etymology

Plot Options !

Synopsis

User applications need to create instances of PlotOptions, fill them in, and send one in per TablePlot::plotData call. These options are then stored in the PanelParams class, and TablePlot holds a bunch of PanelParams, corresponding to its BasePlots.

Motivation

The need to have all plot options originate from one single place, and to have their defaults also set in one single place.

Thrown Exceptions

To Do

Definition at line 91 of file PanelParams.h.


Constructor & Destructor Documentation

casa::PlotOptions::PlotOptions ( )

Constructor.

casa::PlotOptions::~PlotOptions ( )

Destructor.


Member Function Documentation

String casa::PlotOptions::fillFromRecord ( Record rpop)

Fill entries from a record.

Int casa::PlotOptions::getParsedParams ( Int timeplot,
Int plotcolour,
String pyplotsym 
) [inline]

To allow PanelPArams to get access to some private variables.

Definition at line 337 of file PanelParams.h.

References PlotColour_p, PyPlotSymbol_p, and TimePlot_p.

PlotOptions& casa::PlotOptions::operator= ( PlotOptions inplop)

operator= : copy semantics

String casa::PlotOptions::print ( )

Return a string of current values to print (for debugging)

Bool casa::PlotOptions::reset ( )

Reset to defaults.

Vector<String> casa::PlotOptions::validateParams ( )

Validate Current entries Returns 2 Strings, Errors and Warnings.


Member Data Documentation

Default : 1.0 .

-> height/width Must be same for all panels !

Definition at line 204 of file PanelParams.h.

Default : 1 No averaging.

If >1, averages every N points. Users of plotoptions, need to order/sort/select the input Table, so that such averaging is accurate.

Definition at line 319 of file PanelParams.h.

Default : TPGuiCallBackHooks instance.

Applications can supply their own custom function for application specific formatting. (example : chan numbers to frequency vals.)

Definition at line 221 of file PanelParams.h.

Definition at line 355 of file PanelParams.h.

A long list of supported colour names.

Definition at line 350 of file PanelParams.h.

Default : '' .

matplotlib colour string Can be a predefined pylab colour 'brown', or an html hex string '#7FFF4e', or '(r,g,b)'. If specified (length>0), this takes precedence over the colour specified via PlotSymbol. If a non-predefined colour is specified, MultiColour is always False.

Definition at line 269 of file PanelParams.h.

default : True : To use with CrossPlot.

True : Columns of the Array are the x axis. False : Rows of the Array are the x axis. (example : for a MeasurementSet and "DATA" True : channels on x-axis False : correlations on x-axis )

Definition at line 148 of file PanelParams.h.

Default : 'none' : no points are connected by lines.

If 'tablerow' : number of plots = nchans x ncorrs number of points per plot = nrows -> points along table rows are connected. If 'cellcol' : number of plots = nrows x ncorrs number of points per plot = nchans -> points along cell cols are connected If 'cellrow' : number of plots = nrows x nchans number of points per plot = ncorrs -> points along cell rows are connected. Currently, 'cellcol' and 'cellrow' do the same thing. Nplots = nrow, points per plot = nchanxncorr.

Definition at line 334 of file PanelParams.h.

Default : NULL If left as NULL, it gets replaced by a pointer to TPConvertVase.

This is the base class that does not modify values read from the table. Modifications to TaQL expressions, that cannot be written as TaQL strings, can go in here, and will get applied to every value being read from the TaQL result.

Definition at line 215 of file PanelParams.h.

Has the 'Convert' TPConvertXXX been created inside PlotOptions, or by the user ? True : created inside here => needs to be deleted inside here too, during cleanup.

False : created outside and supplied in => don't try to delete it !

Definition at line 375 of file PanelParams.h.

for chan/time averaging

Definition at line 354 of file PanelParams.h.

Default : False True : If a Scalar or Vector reduction has been done using MEAN(), the values are rescaled to account for the number of flagged values being averaged by TaQL.

Note : Try not to use this. False : Don't do any scaling correction. This is if averaging is via SUM(...)/SUM()

Definition at line 230 of file PanelParams.h.

Definition at line 321 of file PanelParams.h.

Default : "main" Name of the flag version to use while plotting If it doesn't find this name, it uses "main".

Definition at line 306 of file PanelParams.h.

Default : 12 .

matplotlib font size This is the title size. The x,ylabels are 80% of this size.

Definition at line 184 of file PanelParams.h.

Default : False ( only for CrossPlot ) False : Compute the average x axis value as the middle of the range being avgd True : Compute the average x axis value accounting for flagged cell rows/cols.

Definition at line 246 of file PanelParams.h.

Default : 2.0 .

matplotlib linewidth

Definition at line 279 of file PanelParams.h.

Default : [] This is the list of Table columns that will get sent into the "locate" function when triggered by the GUI.

It will be overridden by anything specified in a DumpLocateInfoBase class.

Definition at line 254 of file PanelParams.h.

Default : 10.0 .

matplotlib markersize

Definition at line 276 of file PanelParams.h.

Definition at line 357 of file PanelParams.h.

Default : 'none' 'cellrow' : Cell rows get different colours 'cellcol' : Cell cols get different colours 'both': rows and cols get different colours 'none': rows and cols get the same colour.

Definition at line 286 of file PanelParams.h.

Allowed, predefined colours.

Definition at line 343 of file PanelParams.h.

Default : False True : This plot must sit on top of existing plots False : This plot will be a fresh plot clearing away all existing layers.

Definition at line 154 of file PanelParams.h.

Layer Independant Plot Parameters.

default : [1,1,1]. [nrows, ncols, panel_index] from matplotlib

Definition at line 121 of file PanelParams.h.

an Int for the colour part of plotsymbol

Definition at line 365 of file PanelParams.h.

Referenced by getParsedParams().

default : [].

[xmin,xmax,ymin,ymax] If min=max, default data range is used.

Definition at line 126 of file PanelParams.h.

default : [].

[xminSet,xmaxSet,yminSet,ymaxSet] Bitmap to indicate which range values have been set in the PotRange option.

Definition at line 132 of file PanelParams.h.

Layer Dependant Plot Parameters.

Default : ',' . matplotlib plotsymbols

Definition at line 260 of file PanelParams.h.

Default [] : If specified, it will apply to the first N plotted points.

Definition at line 273 of file PanelParams.h.

Definition at line 351 of file PanelParams.h.

just the plotsymbol (without colour)

Definition at line 367 of file PanelParams.h.

Referenced by getParsedParams().

Default : True True : Make TablePlot mimic the matplotlib behaviour of automatically clearing panels when a new panel overlaps on it.

False : Do not do the above. The user will have to explicitly clear a panel. (example : To make a tiny plot that sits in a corner, inside an existing larger plot.)

Definition at line 179 of file PanelParams.h.

Default : False True : OverPlot=False will replace only the top layer, and will not clear away all existing layers.

(example : after making an overplot, the plotsymbol for the top-most layer is to be changed without having to replot all existing layers) False : OverPlot=False will clear up all existing layers, before plotting.

Definition at line 166 of file PanelParams.h.

Definition at line 356 of file PanelParams.h.

Default : 'none' 'row' : iteration plots from multiple TaQLs can be run parallely.

The panels are separated into rows. 'col' : iteration plots from multiple TaQLs can be run parallely. The panels are separated into cols.

Definition at line 239 of file PanelParams.h.

Default : False True : Plot flagged points in purple False : Plot unflagged points in specified colour (example : Do an overplot with False and then True, to see flagged and unflagged points in different colours.)

Definition at line 301 of file PanelParams.h.

Default : 1 Start with the first point, and then plot only if npoints % SkipNRows == 0.

Definition at line 311 of file PanelParams.h.

Definition at line 358 of file PanelParams.h.

Default : True True : When multiple Tables are sent in simultaneously into TablePlot, they go to different Layers and automatically increment colours.

False : All layers begin with the same colour

Definition at line 293 of file PanelParams.h.

0:1:2:3 -> 'o','x','y','b'

Definition at line 363 of file PanelParams.h.

Referenced by getParsedParams().

default : 'o' 'o' : off -> no time formatting 'x' : time formatting for x axis 'y' : time formatting for y axis 'b' : time formatting for x and y axes

Definition at line 139 of file PanelParams.h.

Title For multiline labels, beware of newline characters.

These strings must contain "\\n" in them for newlines.

Definition at line 196 of file PanelParams.h.

Definition at line 347 of file PanelParams.h.

Default : 8.0 ( in cm ).

matplotlib convention Must be same for all panels !

Definition at line 200 of file PanelParams.h.

X axis label.

Definition at line 187 of file PanelParams.h.

Y axis label.

Definition at line 190 of file PanelParams.h.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines