plotpp::YErrorLine
Represents a YErrorLine plot from x- and y-coordiantes. More...
#include <YErrorLine.hpp>
Inherits from plotpp::IPlot
Public Functions
Name | |
---|---|
YErrorLine(optional_ptr< Tx > x, optional_ptr< Ty > y, optional_ptr< Terr > err) Constructs a YErrorLine with optional x and y coordinate ranges. |
|
YErrorLine(YErrorLine const & ) =default Default copy constructor. |
|
YErrorLine(YErrorLine && ) =default Default move constructor. |
|
YErrorLine & | operator=(YErrorLine const & ) =default Default copy assignment. |
YErrorLine & | operator=(YErrorLine && ) =default Default move assignment. |
LineType | lineType() const Gets the YErrorLine type. |
YErrorLine & | lineType(LineType lt) Sets the YErrorLine type. |
YErrorLine && | lineType(LineType lt) Sets the YErrorLine type. |
float | YErrorLineWidth() const Gets the YErrorLine width. |
YErrorLine & | YErrorLineWidth(float lw) Sets the YErrorLine width. |
YErrorLine && | YErrorLineWidth(float lw) Sets the YErrorLine width. |
Color | YErrorLineColor() const Gets the YErrorLine color. |
YErrorLine & | YErrorLineColor(Color col) Sets the YErrorLine color. |
YErrorLine && | YErrorLineColor(Color col) Sets the YErrorLine color. |
YErrorLine & | YErrorLineColor(float r, float g, float b) Sets the YErrorLine color. |
YErrorLine && | YErrorLineColor(float r, float g, float b) Sets the YErrorLine color. |
Color | fillColor() const Gets the YErrorLine color. |
YErrorLine & | fillColor(Color col) Sets the fill color. |
YErrorLine && | fillColor(Color col) Sets the fill color. |
YErrorLine & | color(Color col) Sets the YErrorLine and fill color. |
YErrorLine && | color(Color col) Sets the YErrorLine and fill color. |
YErrorLine & | autoYErrorLineColor() Enables automatic YErrorLine coloring. |
YErrorLine && | autoYErrorLineColor() Enables automatic YErrorLine coloring. |
YErrorLine & | autoFillColor() Enables automatic fill coloring. |
YErrorLine && | autoFillColor() Enables automatic fill coloring. |
YErrorLine & | autoColor() Enables automatic YErrorLine and fill coloring. |
YErrorLine && | autoColor() Enables automatic YErrorLine and fill coloring. |
YErrorLine & | fill(float opacity =0.3) Sets the opacity of the fill color. |
YErrorLine && | fill(float opacity =0.3) Sets the opacity of the fill color. |
YErrorLine & | fillPattern(int n) Sets the fill pattern. |
YErrorLine && | fillPattern(int n) Sets the fill pattern. |
YErrorLine & | noFill() Disables the curve fill. |
YErrorLine && | noFill() Disables the curve fill. |
bool | isFilled() const Tells whether or not the fill is enabled. |
YErrorLine & | label(const PlotTitle & label) Sets the label to be seen in the legend of the plot. |
YErrorLine && | label(const PlotTitle & label) Sets the label to be seen in the legend of the plot. |
YErrorLine & | label(PlotTitle && label) Sets the label to be seen in the legend of the plot. |
YErrorLine && | label(PlotTitle && label) Sets the label to be seen in the legend of the plot. |
Tx * | x() Gets the x-values. |
const Tx * | x() const Gets the x-values. |
Ty * | y() Gets the y-values. |
const Ty * | y() const Gets the y-values. |
virtual void | printPlot(FILE * fptr) const override prints the plot command for gnuplot |
virtual void | printData(FILE * fptr) const override prints the data for gnuplot |
Additional inherited members
Public Functions inherited from plotpp::IPlot
Name | |
---|---|
IPlot() =default | |
IPlot(std::string label) | |
virtual | ~IPlot() |
virtual void | printSettings(std::ostream & stream) const =delete |
virtual void | printSettings(FILE * fptr) const |
Protected Functions inherited from plotpp::IPlot
Name | |
---|---|
virtual IPlot & | uid(size_t & uid_io) |
size_t | uid() const |
Friends inherited from plotpp::IPlot
Name | |
---|---|
class | Figure |
Detailed Description
template <std::ranges::forward_range Tx,
std::ranges::forward_range Ty,
std::ranges::forward_range Terr>
class plotpp::YErrorLine;
Represents a YErrorLine plot from x- and y-coordiantes.
Template Parameters:
- Tx Type for x-coordinate range, must satisfy std::ranges::forward_range (aka. have forward
begin()
andend()
iterators) - Ty Type for y-coordinate range, must satisfy std::ranges::forward_range ()
The YErrorLine class holds information about how to draw a YErrorLine plot in a figure. It supports various customizations such as YErrorLine type, color, and fill styles.
Public Functions Documentation
function YErrorLine
inline YErrorLine(
optional_ptr< Tx > x,
optional_ptr< Ty > y,
optional_ptr< Terr > err
)
Constructs a YErrorLine with optional x and y coordinate ranges.
Parameters:
- x optional_ptr to the x-coordinate range.
- y optional_ptr to the y-coordinate range.
Suggestion: Use these construction helpers instead:
- YErrorLine(Ux&& x, Uy&& y)
- YErrorLine(Uy&& y)
function YErrorLine
YErrorLine(
YErrorLine const &
) =default
Default copy constructor.
function YErrorLine
YErrorLine(
YErrorLine &&
) =default
Default move constructor.
function operator=
YErrorLine & operator=(
YErrorLine const &
) =default
Default copy assignment.
function operator=
YErrorLine & operator=(
YErrorLine &&
) =default
Default move assignment.
function lineType
inline LineType lineType() const
Gets the YErrorLine type.
Return: LineType - The current LineType
function lineType
inline YErrorLine & lineType(
LineType lt
)
Sets the YErrorLine type.
Parameters:
- lt : LineType - The new YErrorLine type
Return: YErrorLine - Self, for method chaining
function lineType
inline YErrorLine && lineType(
LineType lt
)
Sets the YErrorLine type.
Parameters:
- lt : float - The new YErrorLine type
Return: YErrorLine - Self, for method chaining
function YErrorLineWidth
inline float YErrorLineWidth() const
Gets the YErrorLine width.
Return: float: The current YErrorLine width
function YErrorLineWidth
inline YErrorLine & YErrorLineWidth(
float lw
)
Sets the YErrorLine width.
Parameters:
- lw : float - The new YErrorLine width
Return: YErrorLine - Self, for method chaining
function YErrorLineWidth
inline YErrorLine && YErrorLineWidth(
float lw
)
Sets the YErrorLine width.
Parameters:
- lw : float - The new YErrorLine width
Return: YErrorLine - Self, for method chaining
function YErrorLineColor
inline Color YErrorLineColor() const
Gets the YErrorLine color.
Return: Color - the current YErrorLine color
function YErrorLineColor
inline YErrorLine & YErrorLineColor(
Color col
)
Sets the YErrorLine color.
Parameters:
- col : Color - The new YErrorLine color
Return: YErrorLine - Self, for method chaining
function YErrorLineColor
inline YErrorLine && YErrorLineColor(
Color col
)
Sets the YErrorLine color.
Parameters:
- col : Color - The new YErrorLine color
Return: YErrorLine - Self, for method chaining
function YErrorLineColor
inline YErrorLine & YErrorLineColor(
float r,
float g,
float b
)
Sets the YErrorLine color.
Parameters:
- rgb : float - The new YErrorLine color in rgb-values in the range [0, 1]
Return: YErrorLine - Self, for method chaining
function YErrorLineColor
inline YErrorLine && YErrorLineColor(
float r,
float g,
float b
)
Sets the YErrorLine color.
Parameters:
- rgb : float - The new YErrorLine color in rgb-values in the range [0, 1]
Return: YErrorLine - Self, for method chaining
function fillColor
inline Color fillColor() const
Gets the YErrorLine color.
Return: Color - the current fill color
function fillColor
inline YErrorLine & fillColor(
Color col
)
Sets the fill color.
Parameters:
- col : Color - The new fill color
Return: fill - Self, for method chaining
function fillColor
inline YErrorLine && fillColor(
Color col
)
Sets the fill color.
Parameters:
- col : Color - The new fill color
Return: fill - Self, for method chaining
function color
inline YErrorLine & color(
Color col
)
Sets the YErrorLine and fill color.
Parameters:
- col : Color - The new YErrorLine and fill color
Return: fill - Self, for method chaining
function color
inline YErrorLine && color(
Color col
)
Sets the YErrorLine and fill color.
Parameters:
- col : Color - The new YErrorLine and fill color
Return: fill - Self, for method chaining
function autoYErrorLineColor
inline YErrorLine & autoYErrorLineColor()
Enables automatic YErrorLine coloring.
Return: YErrorLine - Self, for method chaining
function autoYErrorLineColor
inline YErrorLine && autoYErrorLineColor()
Enables automatic YErrorLine coloring.
Return: YErrorLine - Self, for method chaining
function autoFillColor
inline YErrorLine & autoFillColor()
Enables automatic fill coloring.
Return: YErrorLine - Self, for method chaining
function autoFillColor
inline YErrorLine && autoFillColor()
Enables automatic fill coloring.
Return: YErrorLine - Self, for method chaining
function autoColor
inline YErrorLine & autoColor()
Enables automatic YErrorLine and fill coloring.
Return: YErrorLine - Self, for method chaining
function autoColor
inline YErrorLine && autoColor()
Enables automatic YErrorLine and fill coloring.
Return: YErrorLine - Self, for method chaining
function fill
inline YErrorLine & fill(
float opacity =0.3
)
Sets the opacity of the fill color.
Parameters:
- rgb : float - the new opacity in a range of [0, 1]
Return: YErrorLine - Self, for method chaining
function fill
inline YErrorLine && fill(
float opacity =0.3
)
Sets the opacity of the fill color.
Parameters:
- rgb : float - the new opacity in a range of [0, 1]
Return: YErrorLine - Self, for method chaining
function fillPattern
inline YErrorLine & fillPattern(
int n
)
Sets the fill pattern.
Parameters:
- n : int - Select one of Gnuplots fill patterns. May be benefitial for printing figures on paper.
Return: YErrorLine - Self, for method chaining
function fillPattern
inline YErrorLine && fillPattern(
int n
)
Sets the fill pattern.
Parameters:
- n : int - Select one of Gnuplots fill patterns. May be benefitial for printing figures on paper.
Return: YErrorLine - Self, for method chaining
function noFill
inline YErrorLine & noFill()
Disables the curve fill.
Return: YErrorLine - Self, for method chaining
function noFill
inline YErrorLine && noFill()
Disables the curve fill.
Return: YErrorLine - Self, for method chaining
function isFilled
inline bool isFilled() const
Tells whether or not the fill is enabled.
Return: bool - Returns true
if the fill is enabled and false
otherwise
function label
inline YErrorLine & label(
const PlotTitle & label
)
Sets the label to be seen in the legend of the plot.
Parameters:
- label : PlotTitle - A title of the plot containing the label to be displayed in the legend
Return: YErrorLine - Self, for method chaining
function label
inline YErrorLine && label(
const PlotTitle & label
)
Sets the label to be seen in the legend of the plot.
Parameters:
- label : PlotTitle - A title of the plot containing the label to be displayed in the legend
Return: YErrorLine - Self, for method chaining
function label
inline YErrorLine & label(
PlotTitle && label
)
Sets the label to be seen in the legend of the plot.
Parameters:
- label : PlotTitle - A title of the plot containing the label to be displayed in the legend
Return: YErrorLine - Self, for method chaining
function label
inline YErrorLine && label(
PlotTitle && label
)
Sets the label to be seen in the legend of the plot.
Parameters:
- label : PlotTitle - A title of the plot containing the label to be displayed in the legend
Return: YErrorLine - Self, for method chaining
function x
inline Tx * x()
Gets the x-values.
Return: Tx - A pointer to the provided x-values of the plot. May be a nullptr
if non were provided.
function x
inline const Tx * x() const
Gets the x-values.
Return: Tx - A pointer to the provided x-values of the plot. May be a nullptr
if non were provided.
function y
inline Ty * y()
Gets the y-values.
Return: Ty - A pointer to the provided y-values of the plot
function y
inline const Ty * y() const
Gets the y-values.
Return: Ty - A pointer to the provided y-values of the plot
function printPlot
inline virtual void printPlot(
FILE * fptr
) const override
prints the plot command for gnuplot
Parameters:
- file : FILE - A pointer to the stream/file that the plot command shall be written to.
Reimplements: plotpp::IPlot::printPlot
This function does normally not need to be called by the user. The class Figure will take care it and the communication with Gnuplot.
function printData
inline virtual void printData(
FILE * fptr
) const override
prints the data for gnuplot
Parameters:
- file : FILE - A pointer to the stream/file that the plot command shall be written to.
Reimplements: plotpp::IPlot::printData
This function does normally not need to be called by the user. The class Figure will take care it and the communication with Gnuplot.
Updated on 2025-03-11 at 16:08:10 +0100