scatter 0.1.0
scatter::Plot Class Reference

main class for creating plots More...

#include <scatter/Plot.hpp>

Inheritance diagram for scatter::Plot:

Public Types

typedef std::shared_ptr< PlotPtr
 typedef for convenience
 

Public Member Functions

 Plot ()=delete
 delete default constructor in order to enforce using Plot::create
 
virtual ~Plot ()
 destructor
 
bool save (const std::string &file, const FigureOptions &options=FigureOptions())
 save the plot to the given filepath
 
PlotOptionsoptions ()
 [brief description]
 
template<class T , class... Args>
T::Options * add (Args &&...args)
 [brief description]
 

Static Public Member Functions

static Plot::Ptr create (const PlotOptions &options=PlotOptions())
 create a new Plot
 
static Plot::Ptr create (const std::string &title, const PlotOptions &options=PlotOptions())
 create a new Plot
 

Friends

void Figure::save (const std::string &)
 allow Figure::save to access private members of this class
 

Detailed Description

main class for creating plots

instances of this class can only be created using Plot::create

Constructor & Destructor Documentation

◆ Plot()

scatter::Plot::Plot ( )
delete

delete default constructor in order to enforce using Plot::create

[long description]

◆ ~Plot()

virtual scatter::Plot::~Plot ( )
virtual

destructor

[long description]

Member Function Documentation

◆ add()

template<class T , class... Args>
T::Options * scatter::Plot::add ( Args &&... args)
inline

[brief description]

[long description]

Parameters
args[description]
Returns
[description]

References options().

◆ create() [1/2]

static Plot::Ptr scatter::Plot::create ( const PlotOptions & options = PlotOptions())
static

create a new Plot

[long description]

Parameters
optionsPlotOptions
Returns
Plot

◆ create() [2/2]

static Plot::Ptr scatter::Plot::create ( const std::string & title,
const PlotOptions & options = PlotOptions() )
static

create a new Plot

convenience overload

Parameters
titletitle of the Plot
optionsPlotOptions
Returns
Plot

◆ options()

PlotOptions & scatter::Plot::options ( )

[brief description]

[long description]

Returns
[description]

Referenced by add().

◆ save()

bool scatter::Plot::save ( const std::string & file,
const FigureOptions & options = FigureOptions() )

save the plot to the given filepath

this function creates a temporary Figure

Parameters
filepath and file name
optionsoptions for the temporary Figure that is created in order to save the Plot
Returns
true if the Plot was saved successfully

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