casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
casa::ScatterPlot Class Referenceabstract

Scatter plot abstract class. More...

#include <Plot.h>

Inheritance diagram for casa::ScatterPlot:
casa::Plot casa::PlotItem casa::ColoredPlot casa::ErrorPlot casa::MaskedScatterPlot

Public Member Functions

 ScatterPlot ()
 
virtual ~ScatterPlot ()
 
virtual PlotDataPtr data () const
 Overrides Plot::data(). More...
 
virtual ppoint_t pointAt (unsigned int i) const
 Returns the data value at the given index. More...
 
virtual unsigned int drawCount () const
 Implements PlotItem::drawCount(). More...
 
virtual PlotPointDataPtr pointData () const =0
 ABSTRACT METHODS //. More...
 
virtual bool linesStep () const =0
 Get/set to connect points in step rather than line. More...
 
virtual void setLinesStep (bool linesStep=true)=0
 
virtual bool symbolsShown () const =0
 Returns true if symbols are shown, false otherwise. More...
 
virtual void setSymbolsShown (bool symbolsShown=true)=0
 Sets whether symbols are shown or not. More...
 
virtual PlotSymbolPtr symbol () const =0
 Returns a copy of the symbol for this plot. More...
 
virtual void setSymbol (const PlotSymbol &symbol)=0
 Sets the plot symbols to the given symbol. More...
 
virtual void setSymbol (const PlotSymbolPtr symbol)
 IMPLEMENTED METHODS //. More...
 
virtual void setSymbol (PlotSymbol::Symbol s)
 
virtual void setSymbol (char s)
 
virtual void setSymbolSize (double width, double height)
 
virtual void setSymbolLine (const PlotLine &line)
 
virtual void setSymbolLine (const PlotLinePtr line)
 
virtual void setSymbolLine (const casacore::String &color, PlotLine::Style style=PlotLine::SOLID, double width=1.0)
 
virtual void setSymbolAreaFill (const PlotAreaFill &fill)
 
virtual void setSymbolAreaFill (const PlotAreaFillPtr fill)
 
virtual void setSymbolAreaFill (const casacore::String &color, PlotAreaFill::Pattern pattern=PlotAreaFill::FILL)
 
- Public Member Functions inherited from casa::Plot
 Plot ()
 
virtual ~Plot ()
 
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. More...
 
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. More...
 
virtual void setLinesShown (bool linesShown=true)=0
 Sets whether or not lines are shown. More...
 
virtual PlotLinePtr line () const =0
 Returns a copy of the line used for this plot. More...
 
virtual void setLine (const PlotLine &line)=0
 Sets the plot lines to the given line. More...
 
virtual void setLine (const PlotLinePtr line)
 IMPLEMENTED METHODS //. More...
 
virtual void setLine (const casacore::String &color, PlotLine::Style style=PlotLine::SOLID, double width=1.0)
 
virtual void setLineColor (const casacore::String &color)
 
virtual void setLineStyle (PlotLine::Style style)
 
virtual void setLineWidth (double width)
 
- Public Member Functions inherited from casa::PlotItem
 PlotItem ()
 Constructor. More...
 
virtual ~PlotItem ()
 Destructor. More...
 
virtual PlotCanvascanvas () const =0
 Returns the canvas this item is currently attached to, or NULL for none. More...
 
virtual casacore::String title () const =0
 Returns a human-readable title for identification. More...
 
virtual void setTitle (const casacore::String &newTitle)=0
 Sets this items's title to the given. More...
 
virtual bool isValid () const =0
 Returns true if this item is valid, false otherwise. More...
 
virtual bool isQWidget () const =0
 Returns whether this item can be directly casted to a QWidget or not. More...
 
virtual PlotAxis xAxis () const =0
 Returns the item's axes. More...
 
virtual PlotAxis yAxis () const =0
 
virtual void setXAxis (PlotAxis x)=0
 Sets the item's axes. More...
 
virtual void setYAxis (PlotAxis y)=0
 
virtual void setAxes (PlotAxis x, PlotAxis y)
 Sets both the item's axes at once. More...
 
virtual unsigned int drawSegments (unsigned int segmentThreshold) const
 Returns the number of draw segments for this item, using the given segment threshold. More...
 

Detailed Description

Scatter plot abstract class.

In addition to the abstract methods in Plot, a scatter plot subclass should also have symbol customization for the points. A scatter plot is expected to consist of PlotPointData.

Definition at line 116 of file Plot.h.

Constructor & Destructor Documentation

casa::ScatterPlot::ScatterPlot ( )
inline

Definition at line 118 of file Plot.h.

virtual casa::ScatterPlot::~ScatterPlot ( )
inlinevirtual

Definition at line 120 of file Plot.h.

Member Function Documentation

virtual PlotDataPtr casa::ScatterPlot::data ( ) const
inlinevirtual

Overrides Plot::data().

Implements casa::Plot.

Definition at line 124 of file Plot.h.

References pointData().

Referenced by casa::MaskedScatterPlot::maskedAt(), and pointAt().

virtual unsigned int casa::ScatterPlot::drawCount ( ) const
inlinevirtual

Implements PlotItem::drawCount().

Provides default implementation that returns the number of plotted points.

Implements casa::PlotItem.

Definition at line 136 of file Plot.h.

References pointData().

virtual bool casa::ScatterPlot::linesStep ( ) const
pure virtual

Get/set to connect points in step rather than line.

virtual ppoint_t casa::ScatterPlot::pointAt ( unsigned int  i) const
inlinevirtual

Returns the data value at the given index.

Just a thin layer over the PlotPointData functionality.

Definition at line 128 of file Plot.h.

References data(), and pointData().

virtual PlotPointDataPtr casa::ScatterPlot::pointData ( ) const
pure virtual

ABSTRACT METHODS //.

Returns the point data used for this plot.

Implemented in casa::ColoredPlot, casa::ErrorPlot, and casa::MaskedScatterPlot.

Referenced by data(), drawCount(), and pointAt().

virtual void casa::ScatterPlot::setLinesStep ( bool  linesStep = true)
pure virtual
virtual void casa::ScatterPlot::setSymbol ( const PlotSymbol symbol)
pure virtual

Sets the plot symbols to the given symbol.

Implies setSymbolsShown(true) unless the symbol's style is set to NOSYMBOL.

Referenced by setSymbol(), setSymbolAreaFill(), setSymbolLine(), and setSymbolSize().

virtual void casa::ScatterPlot::setSymbol ( const PlotSymbolPtr  symbol)
inlinevirtual

IMPLEMENTED METHODS //.

Convenience methods for setting symbol.

Definition at line 170 of file Plot.h.

References casacore::CountedPtr< T >::null(), setSymbol(), and setSymbolsShown().

virtual void casa::ScatterPlot::setSymbol ( PlotSymbol::Symbol  s)
inlinevirtual

Definition at line 174 of file Plot.h.

References setSymbol(), and symbol().

virtual void casa::ScatterPlot::setSymbol ( char  s)
inlinevirtual

Definition at line 179 of file Plot.h.

References setSymbol(), and symbol().

virtual void casa::ScatterPlot::setSymbolAreaFill ( const PlotAreaFill fill)
inlinevirtual

Definition at line 202 of file Plot.h.

References setSymbol(), and symbol().

Referenced by setSymbolAreaFill().

virtual void casa::ScatterPlot::setSymbolAreaFill ( const PlotAreaFillPtr  fill)
inlinevirtual

Definition at line 207 of file Plot.h.

References casacore::CountedPtr< T >::null(), and setSymbolAreaFill().

virtual void casa::ScatterPlot::setSymbolAreaFill ( const casacore::String color,
PlotAreaFill::Pattern  pattern = PlotAreaFill::FILL 
)
inlinevirtual

Definition at line 209 of file Plot.h.

References casacore::pattern(), setSymbol(), and symbol().

virtual void casa::ScatterPlot::setSymbolLine ( const PlotLine line)
inlinevirtual

Definition at line 189 of file Plot.h.

References setSymbol(), and symbol().

Referenced by setSymbolLine().

virtual void casa::ScatterPlot::setSymbolLine ( const PlotLinePtr  line)
inlinevirtual

Definition at line 194 of file Plot.h.

References casacore::CountedPtr< T >::null(), and setSymbolLine().

virtual void casa::ScatterPlot::setSymbolLine ( const casacore::String color,
PlotLine::Style  style = PlotLine::SOLID,
double  width = 1.0 
)
inlinevirtual

Definition at line 196 of file Plot.h.

References setSymbol(), and symbol().

virtual void casa::ScatterPlot::setSymbolSize ( double  width,
double  height 
)
inlinevirtual

Definition at line 184 of file Plot.h.

References setSymbol(), and symbol().

virtual void casa::ScatterPlot::setSymbolsShown ( bool  symbolsShown = true)
pure virtual

Sets whether symbols are shown or not.

If symbolsShown is true, the implementation can decide whether to choose the symbol shown, or just use the last set PlotSymbol.

Referenced by setSymbol().

virtual PlotSymbolPtr casa::ScatterPlot::symbol ( ) const
pure virtual

Returns a copy of the symbol for this plot.

Note: if symbols are not shown, then this behavior is undefined. The last shown symbol can be returned, or a symbol with style NOSYMBOL, or a null pointer, or....

Referenced by setSymbol(), setSymbolAreaFill(), setSymbolLine(), and setSymbolSize().

virtual bool casa::ScatterPlot::symbolsShown ( ) const
pure virtual

Returns true if symbols are shown, false otherwise.


The documentation for this class was generated from the following file: