|
| bool | xlim (double left, double right) |
| | Set the x-axis view limits.
|
| |
| bool | ylim (double bottom, double top) |
| | Set the y-axis view limits.
|
| |
| std::array< double, 2 > | xlim () |
| | Get the x-axis view limits.
|
| |
| std::array< double, 2 > | ylim () |
| | Get the y-axis view limits.
|
| |
| void | backend (const std::string &name) |
| | Set the backend used by matplotlib.
|
| |
| bool | annotate (const std::string &text, const double x, const double y) |
| | Annotate the point xy with text.
|
| |
| int | figure (const int fig_number=-1) |
| | Create a new figure or select an existing figure.
|
| |
| template<class ContainerX, class ContainerY> |
| bool | plot (const ContainerX &x, const ContainerY &y, const PlotKwargs &kwargs={}) |
| | Plot y versus x as lines and/or markers.
|
| |
| template<class ContainerX, class ContainerY, class ContainerZ> |
| bool | plot_surface (const ContainerX &x, const ContainerY &y, const ContainerZ &z, const PlotSurfaceKwargs &kwargs={}) |
| | Create a surface plot.
|
| |
| template<class ContainerX, class ContainerY, class ContainerZ> |
| bool | plot_wireframe (const ContainerX &x, const ContainerY &y, const ContainerZ &z, const PlotWireframeKwargs &kwargs={}) |
| |
| template<class ContainerX, class ContainerY1, class ContainerY2> |
| bool | fill_between (const ContainerX &x, const ContainerY1 &y1, const ContainerY2 &y2, const FillBetweenKwargs &kwargs={}) |
| | Fill the area between two horizontal curves.
|
| |
| bool | savefig (const std::string &filename, const SaveKwargs &kwargs={}) |
| | Save the current figure as an image or vector graphic to a file.
|
| |
| void | show (const bool block=true) |
| | Show the current figure.
|
| |
| template<class ContainerX, class ContainerY> |
| bool | scatter (const ContainerX &x, const ContainerY &y, const ScatterKwargs &kwargs={}) |
| | A scatter plot of y vs x with varying marker size and/or color.
|
| |
| template<class ContainerX, class ContainerY, class ContainerZ> |
| bool | scatter (const ContainerX &x, const ContainerY &y, const ContainerZ &z, const ScatterKwargs &kwargs={}) |
| | A scatter plot of y vs x vs z with varying marker size and/or color.
|
| |
Lucid's matplotlib wrapper.
Inspired by Benno Evers' matplotlib-cpp.
| void lucid::plt::backend |
( |
const std::string & | name | ) |
|
|
inline |
Set the backend used by matplotlib.
Use 'AGG', 'PDF', 'PS', 'SVG', 'Cairo' in non-interactive mode (i.e. you won't be able to run show()). Use 'WebAgg', 'QtAgg', 'GTK3Agg', 'GTK3Cairo', 'wxAgg', 'TkAgg' for interactive mode. The interactive backend will only work if the required python packages are installed (e.g., tornado for 'WebAgg').
- Note
- This must be called before the first plot command to have any effect.
- Parameters
-
| name | The name of the backend to use. |
- See also
- https://matplotlib.org/stable/users/explain/figure/backends.html
template<class ContainerX, class ContainerY1, class ContainerY2>
| bool lucid::plt::fill_between |
( |
const ContainerX & | x, |
|
|
const ContainerY1 & | y1, |
|
|
const ContainerY2 & | y2, |
|
|
const FillBetweenKwargs & | kwargs = {} ) |
Fill the area between two horizontal curves.
The curves are defined by the points (x, y1) and (x, y2). This creates one or multiple polygons describing the filled area. You may exclude some horizontal sections from filling using where. By default, the edges connect the given points directly. Use step if the filling should be a step function, i.e. constant in between x.
- Template Parameters
-
| ContainerX | container type for x |
| ContainerY1 | container type for y1 |
| ContainerY2 | container type for y2 |
- Parameters
-
| x | x coordinates of the nodes defining the curves. |
| y1 | y coordinates of the nodes defining the first curve. If it contains a single value, it is replicated for every element of x |
| y2 | y coordinates of the nodes defining the second curve. If it contains a single value, it is replicated for every element of x |
| kwargs | additional keywords arguments |
- Returns
- true if the function was successful
-
false if an error occurred
- See also
- https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.fill_between.html