Class Layout¶
- Defined in File layout.h
Class Documentation¶
-
class
Layout
¶ Public Functions
-
Layout
(const std::string title = "", const bool is_scene = false)¶ Construct with default basic data (for test plots)
Example use:
Layout my_layout = Layout("a graph title"); // Default constructor Layout() also works my_layout.xLabel("ecks"); my_layout.yLabel("why";
-
Axis *
getAxis
(const AxisDirection &dir, bool create = false)¶ get an axis in the layout by its direction. Optionally, create if not found.
Example use:
Layout my_layout = Layout("a graph title"); // Default constructor Layout() also works axis = my_layout.getAxis(X); // raises error axis = my_layout.getAxis(X, true); // creates the axis and adds it to the layout
- Return
- Parameters
dir
:
-
void
xTitle
(const std::string label)¶ set the title of the x axis
- Parameters
label
: the title of the axis. Can use latex within dollar signs, like “Normalised distance \$\eta\$”
-
void
yTitle
(const std::string label)¶ set the title of the y axis
- Parameters
label
: the title of the axis. Can use latex within dollar signs, like “Normalised distance \$\eta\$”
-
void
zTitle
(const std::string label)¶ set the title of the z axis
- Parameters
label
: the title of the axis. Can use latex within dollar signs, like “Normalised distance \$\eta\$”
-
void
xLog
()¶ change the type of the x axis from its default, ‘linear’, to ‘log’
-
void
yLog
()¶ change the type of the y axis from its default, ‘linear’, to ‘log’
-
void
zLog
()¶ change the type of the z axis from its default, ‘linear’, to ‘log’
Friends
-
void
to_json
(nlohmann::json &j, const Layout &p)¶ Serialise layout into a valid json string.
-