The class used to create multiple figures in one canvas. A canvas can be show on screen or output to file.
More...
#include <Canvas.hpp>
|
| Canvas (const std::initializer_list< std::initializer_list< Figure >> &figures) |
| Construct a Canvas object with given figures.
|
|
| Canvas (const std::vector< std::vector< Figure >> &figures) |
| Construct a Canvas object with given figures.
|
|
Figure & | get (int i, int j) |
| Get reference to figure object on canvas. More...
|
|
auto | autoclean (bool enable=true) -> void |
| Toggle automatic cleaning of temporary files (enabled by default). More...
|
|
auto | defaultPalette (const std::string &name) -> Canvas & |
| Set the default palette of colors for all plots that DO NOT have a palette set. More...
|
|
auto | size (std::size_t width, std::size_t height) -> Canvas & |
| Set the output size of the canvas (in unit of points, with 1 inch = 72 points).
|
|
auto | fontName (std::string name) -> Canvas & |
| Set the font name for all the plots on the canvas (e.g., Helvetica, Georgia, Times).
|
|
auto | fontSize (std::size_t size) -> Canvas & |
| Set the font size for all the plots on the canvas (e.g., 10, 12, 16).
|
|
auto | title (const std::string &title) -> Canvas & |
| Set the title of the canvas. More...
|
|
auto | saveplotdata () const -> void |
| Write the current plot data of all figures to the data file(s).
|
|
auto | show () const -> void |
| Show the canvas in a pop-up window. More...
|
|
auto | save (const std::string &filename) const -> void |
| Save the canvas to a file, with its extension defining the file format. More...
|
|
auto | cleanup () const -> void |
| Delete all files used to store plot data or scripts.
|
|
The class used to create multiple figures in one canvas. A canvas can be show on screen or output to file.
◆ get()
Get reference to figure object on canvas.
- Note
- Will throw if figure does not exist
◆ autoclean()
auto autoclean |
( |
bool |
enable = true | ) |
-> void |
|
inline |
Toggle automatic cleaning of temporary files (enabled by default).
Pass false if you want to keep your script / data files. Call cleanup() to remove those files manually.
◆ defaultPalette()
auto defaultPalette |
( |
const std::string & |
name | ) |
-> Canvas& |
|
inline |
Set the default palette of colors for all plots that DO NOT have a palette set.
- Parameters
-
◆ title()
auto title |
( |
const std::string & |
title | ) |
-> Canvas& |
|
inline |
Set the title of the canvas.
- Note
- This only work for show() atm!
◆ show()
auto show |
( |
| ) |
const -> void |
|
inline |
Show the canvas in a pop-up window.
- Note
- This method removes temporary files after saving if
Canvas::autoclean(true)
(default).
◆ save()
auto save |
( |
const std::string & |
filename | ) |
const -> void |
|
inline |
Save the canvas to a file, with its extension defining the file format.
The extension of the file name determines the file format. The supported formats are: pdf
, eps
, svg
, png
, and jpeg
. Thus, to save the canvas in pdf
format, choose a file name as in canvas.pdf
.
- Note
- This method removes temporary files after saving if
Canvas::autoclean(true)
(default).
The documentation for this class was generated from the following file: