sciplot  0.3.1
A modern C++ plotting library powered by gnuplot
Figure Class Reference

The class used to create multiple plots in one canvas. A container for plots. More...

#include <Figure.hpp>

Public Member Functions

 Figure (const std::initializer_list< std::initializer_list< PlotVariant >> &plots)
 Construct a Figure object with given plots.
 
 Figure (const std::vector< std::vector< PlotVariant >> &plots)
 Construct a Figure object with given plots.
 
Plotget (int i, int j)
 Get reference to generic plot object in figure. More...
 
template<typename T >
T & get (int i, int j)
 Get reference to specific plot object (2D / 3D) in figure. More...
 
auto palette (const std::string &name) -> Figure &
 Set the palette of colors for all plots in the figure. More...
 
auto layout () -> LayoutSpecs &
 Set the layout of the figure inside the canvas and return a reference to the corresponding specs object.
 
auto fontName (std::string name) -> Figure &
 Set the font name for all the plots in the figure (e.g., Helvetica, Georgia, Times).
 
auto fontSize (std::size_t size) -> Figure &
 Set the font size for all the plots in the figure (e.g., 10, 12, 16).
 
auto title (const std::string &title) -> Figure &
 Set the title of the figure.
 
auto saveplotdata () const -> void
 Write the current plot data of all plots to the data file(s).
 
auto cleanup () const -> void
 Delete all files used to store plot data or scripts.
 
auto repr () const -> std::string
 Convert this figure into a gnuplot formatted string.
 
template<>
Plot2Dget (int i, int j)
 

Detailed Description

The class used to create multiple plots in one canvas. A container for plots.

Member Function Documentation

◆ get() [1/2]

Plot & get ( int  i,
int  j 
)
inline

Get reference to generic plot object in figure.

Note
Will throw if plot does not exist

◆ get() [2/2]

T& get ( int  i,
int  j 
)

Get reference to specific plot object (2D / 3D) in figure.

Note
Will throw if plot does not exist or T is of wrong type

◆ palette()

auto palette ( const std::string &  name) -> Figure&
inline

Set the palette of colors for all plots in the figure.

Parameters
nameAny palette name displayed in https://github.com/Gnuplotting/gnuplot-palettes, such as "viridis", "parula", "jet".

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