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::BarPlot Class Referenceabstract

Bar plot abstract class. More...

#include <Plot.h>

Inheritance diagram for casa::BarPlot:
casa::Plot casa::PlotItem

Public Member Functions

 BarPlot ()
virtual ~BarPlot ()
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
virtual bool areaIsFilled () const =0
 Returns whether or not the bars have an area fill or not. More...
virtual void setAreaFilled (bool fill=true)=0
 Sets whether the bars have an area fill. More...
virtual PlotAreaFillPtr areaFill () const =0
 Returns a copy of the area fill used for the bar interiors. More...
virtual void setAreaFill (const PlotAreaFill &areaFill)=0
 Sets the area fill used for the bars to the given. More...
virtual void setAreaFill (const PlotAreaFillPtr areaFill)
virtual void setAreaFill (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)
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

Bar plot abstract class.

It is expected to take data in the form of PlotPointData. The line methods in Plot are used for the bar outlines.

Definition at line 477 of file Plot.h.

Constructor & Destructor Documentation

casa::BarPlot::BarPlot ( )

Definition at line 479 of file Plot.h.

virtual casa::BarPlot::~BarPlot ( )

Definition at line 481 of file Plot.h.

Member Function Documentation

virtual PlotAreaFillPtr casa::BarPlot::areaFill ( ) const
pure virtual

Returns a copy of the area fill used for the bar interiors.

Referenced by setAreaFill().

virtual bool casa::BarPlot::areaIsFilled ( ) const
pure virtual

Returns whether or not the bars have an area fill or not.

PlotDataPtr casa::BarPlot::data ( ) const

Overrides Plot::data().

Implements casa::Plot.

Definition at line 485 of file Plot.h.

References pointData().

Referenced by pointAt().

virtual unsigned int casa::BarPlot::drawCount ( ) const

Implements PlotItem::drawCount().

Provides default implementation that returns the number of plotted points.

Implements casa::PlotItem.

Definition at line 497 of file Plot.h.

References pointData().

virtual ppoint_t casa::BarPlot::pointAt ( unsigned int  i) const

Returns the data value at the given index.

Just a thin layer over the PlotPointData functionality.

Definition at line 489 of file Plot.h.

References data(), and pointData().

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


Returns the data used for the plot.

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

virtual void casa::BarPlot::setAreaFill ( const PlotAreaFill areaFill)
pure virtual

Sets the area fill used for the bars to the given.

Referenced by setAreaFill().

virtual void casa::BarPlot::setAreaFill ( const PlotAreaFillPtr  areaFill)


Convenience methods for setting area fill.

Definition at line 524 of file Plot.h.

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

virtual void casa::BarPlot::setAreaFill ( const casacore::String color,
PlotAreaFill::Pattern  pattern = PlotAreaFill::FILL 

Definition at line 528 of file Plot.h.

References areaFill(), casacore::pattern(), and setAreaFill().

virtual void casa::BarPlot::setAreaFilled ( bool  fill = true)
pure virtual

Sets whether the bars have an area fill.

If fill is true, the implementation can decide whether to choose the area fill, or just use the last set PlotAreaFill.

Referenced by setAreaFill().

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