casa
$Rev:20696$
|
A Plot basically consists of data and customization information. More...
#include <Plot.h>
Public Member Functions | |
Plot () | |
virtual | ~Plot () |
virtual PlotDataPtr | data () const =0 |
ABSTRACT METHODS //. | |
virtual void | dataChanged ()=0 |
Should be called whenever the underlying PlotData has changed, to let the plot and its attached canvas know that the plot needs to be redrawn. | |
virtual bool | linesShown () const =0 |
It's likely that any plot subclass (scatter, bar, function, etc.) will have lines of some sort, so it's safe to have in the base class. | |
virtual void | setLinesShown (bool linesShown=true)=0 |
Sets whether or not lines are shown. | |
virtual PlotLinePtr | line () const =0 |
Returns a copy of the line used for this plot. | |
virtual void | setLine (const PlotLine &line)=0 |
Sets the plot lines to the given line. | |
virtual void | setLine (const PlotLinePtr line) |
IMPLEMENTED METHODS //. | |
virtual void | setLine (const String &color, PlotLine::Style style=PlotLine::SOLID, double width=1.0) |
virtual void | setLineColor (const String &color) |
virtual void | setLineStyle (PlotLine::Style style) |
virtual void | setLineWidth (double width) |
A Plot basically consists of data and customization information.
The data is held by the base class whereas any customization should be handled in subclasses.
casa::Plot::Plot | ( | ) | [inline] |
virtual casa::Plot::~Plot | ( | ) | [inline, virtual] |
virtual PlotDataPtr casa::Plot::data | ( | ) | const [pure virtual] |
ABSTRACT METHODS //.
Returns the data associated with this plot.
Implemented in casa::RasterPlot, casa::BarPlot, and casa::ScatterPlot.
virtual void casa::Plot::dataChanged | ( | ) | [pure virtual] |
Should be called whenever the underlying PlotData has changed, to let the plot and its attached canvas know that the plot needs to be redrawn.
virtual PlotLinePtr casa::Plot::line | ( | ) | const [pure virtual] |
Returns a copy of the line used for this plot.
Note: if lines are not shown, then this behavior is undefined. The last shown line can be returned, or a line with style NOLINE, or a null pointer, or....
Referenced by casa::ErrorPlot::setErrorLine(), casa::ErrorPlot::setErrorLineColor(), casa::ErrorPlot::setErrorLineStyle(), casa::ErrorPlot::setErrorLineWidth(), setLine(), setLineColor(), setLineStyle(), and setLineWidth().
virtual bool casa::Plot::linesShown | ( | ) | const [pure virtual] |
It's likely that any plot subclass (scatter, bar, function, etc.) will have lines of some sort, so it's safe to have in the base class.
Returns true if this plot has lines shown, false otherwise.
virtual void casa::Plot::setLine | ( | const PlotLine & | line | ) | [pure virtual] |
Sets the plot lines to the given line.
Implies setLinesShown(true) unless the given line's style is set to NOLINE.
Referenced by setLine(), setLineColor(), setLineStyle(), and setLineWidth().
virtual void casa::Plot::setLine | ( | const PlotLinePtr | line | ) | [inline, virtual] |
IMPLEMENTED METHODS //.
Convenience methods for setting line.
Definition at line 83 of file Plot.h.
References casa::SimpleCountedConstPtr< t >::null(), setLine(), and setLinesShown().
virtual void casa::Plot::setLine | ( | const String & | color, |
PlotLine::Style | style = PlotLine::SOLID , |
||
double | width = 1.0 |
||
) | [inline, virtual] |
Definition at line 87 of file Plot.h.
References line(), casa::PlotLine::setColor(), setLine(), casa::PlotLine::setStyle(), and casa::PlotLine::setWidth().
virtual void casa::Plot::setLineColor | ( | const String & | color | ) | [inline, virtual] |
Definition at line 96 of file Plot.h.
References line(), casa::PlotLine::setColor(), and setLine().
virtual void casa::Plot::setLinesShown | ( | bool | linesShown = true | ) | [pure virtual] |
virtual void casa::Plot::setLineStyle | ( | PlotLine::Style | style | ) | [inline, virtual] |
Definition at line 101 of file Plot.h.
References line(), setLine(), and casa::PlotLine::setStyle().
virtual void casa::Plot::setLineWidth | ( | double | width | ) | [inline, virtual] |
Definition at line 106 of file Plot.h.
References line(), setLine(), and casa::PlotLine::setWidth().