26namespace func_sketch::plotter {
59 RGBColor{.r = 255, .g = 255, .b = 255};
292 [[nodiscard]]
int top_margin() const noexcept;
const RGBColor & background_color() const noexcept
Get the color of background.
int left_margin_
Left margin of plots in pixels.
RGBColor grid_color_
Color of grid lines.
std::size_t num_pixels_per_tick_in_y_axis_
Number of pixels per tick in the y-axis.
PlotConfig & max_coordinate_change_rate(double value)
Set the threshold of the change in coordinates of sample points relative to the plot range in adaptiv...
int right_margin() const noexcept
Get the right margin of plots in pixels.
double min_param_change_rate() const noexcept
Get the minimum rate of parameter change in adaptive sampling.
int grid_line_width_
Line width of grid lines in pixels.
PlotConfig()=default
Constructor.
std::size_t num_pixels_per_tick_in_x_axis_
Number of pixels per tick in the x-axis.
std::size_t num_pixels_per_tick_in_y_axis() const noexcept
Get the number of pixels per tick in the y-axis.
int right_margin_
Right margin of plots in pixels.
std::size_t max_num_sample_points() const noexcept
Get the maximum number of points to sample in adaptive sampling.
double slope_change_threshold_
PlotConfig & initial_num_sample_points(std::size_t value)
Set the number of points to sample initially in adaptive sampling.
PlotConfig & slope_change_threshold(double value)
Set the threshold of the change in slope normalized by the plot range in adaptive sampling.
int zero_line_width_
Line width of the grid line at zero in pixels.
int grid_line_width() const noexcept
Get the line width of grid lines in pixels.
double max_coordinate_change_rate_
std::size_t initial_num_sample_points_
Number of points to sample initially in adaptive sampling.
PlotConfig & top_margin(int value)
Set the top margin of plots in pixels.
std::size_t num_pixels_per_tick_in_x_axis() const noexcept
Get the number of pixels per tick in the x-axis.
PlotConfig & right_margin(int value)
Set the right margin of plots in pixels.
int bottom_margin_
Bottom margin of plots in pixels.
PlotConfig & num_pixels_per_tick_in_y_axis(std::size_t value)
Set the number of pixels per tick in the y-axis.
PlotConfig & tick_label_font_size(int value)
Set the font size of tick labels in pixels.
PlotConfig & grid_line_width(int value)
Set the line width of grid lines in pixels.
PlotConfig & zero_line_width(int value)
Set the line width of the grid line at zero in pixels.
PlotConfig & num_pixels_per_tick_in_x_axis(std::size_t value)
Set the number of pixels per tick in the x-axis.
int axes_line_width() const noexcept
Get the line width of axes in pixels.
int zero_line_width() const noexcept
Get the line width of the grid line at zero in pixels.
std::size_t max_num_sample_points_
Maximum number of points to sample in adaptive sampling.
double max_coordinate_change_rate() const noexcept
Get the threshold of the change in coordinates of sample points relative to the plot range in adaptiv...
RGBColor axes_color_
Color of axes.
RGBColor background_color_
Color of background.
PlotConfig & axes_line_width(int value)
Set the line width of axes in pixels.
PlotConfig & axes_color(const RGBColor &value)
Set the color of axes.
PlotConfig & curve_line_width(int value)
Set the line width of curves in pixels.
int curve_line_width() const noexcept
Get the line width of curves in pixels.
int curve_line_width_
Line width of curves in pixels.
int bottom_margin() const noexcept
Get the bottom margin of plots in pixels.
int top_margin() const noexcept
Get the top margin of plots in pixels.
int tick_label_font_size() const noexcept
Get the font size of tick labels in pixels.
PlotConfig & max_num_sample_points(std::size_t value)
Set the maximum number of points to sample in adaptive sampling.
int axes_line_width_
Line width of axes in pixels.
const RGBColor & grid_color() const noexcept
Get the color of grid lines.
double slope_change_threshold() const noexcept
Get the threshold of the change in slope normalized by the plot range in adaptive sampling.
std::size_t initial_num_sample_points() const noexcept
Get the number of points to sample initially in adaptive sampling.
double min_param_change_rate_
Minimum rate of parameter change in adaptive sampling.
int tick_label_font_size_
Font size of tick labels in pixels.
PlotConfig & min_param_change_rate(double value)
Set the minimum rate of parameter change in adaptive sampling.
int left_margin() const noexcept
Get the left margin of plots in pixels.
PlotConfig & bottom_margin(int value)
Set the bottom margin of plots in pixels.
PlotConfig & background_color(const RGBColor &value)
Set the color of background.
int top_margin_
Top margin of plots in pixels.
PlotConfig & grid_color(const RGBColor &value)
Set the color of grid lines.
const RGBColor & axes_color() const noexcept
Get the color of axes.
constexpr double min_min_param_change_rate
Minimum value of the minimum rate of parameter change in adaptive sampling for safety limit of memory...
constexpr int default_curve_line_width
Default line width of curves in pixels.
constexpr double default_min_param_change_rate
Default minimum rate of parameter change in adaptive sampling.
constexpr int default_axes_line_width
Default line width of axes in pixels.
constexpr double default_max_coordinate_change_rate
Default threshold of the change in coordinates of sample points relative to the plot range in adaptiv...
constexpr int default_left_margin
Default left margin in pixels.
constexpr auto default_grid_color
Default color of grid lines.
constexpr double default_slope_change_threshold
Default threshold of the change in slope normalized by the plot range in adaptive sampling.
constexpr std::size_t max_max_num_sample_points
Maximum value of the maximum number of points to sample in adaptive sampling for safety limit of memo...
constexpr std::size_t default_initial_num_sample_points
Default number of points to sample initially in adaptive sampling.
constexpr int default_tick_label_font_size
Default font size of tick labels in pixels.
constexpr int default_grid_line_width
Default line width of grid lines in pixels.
constexpr int default_zero_line_width
Default line width of the grid line at zero in pixels.
constexpr auto default_background_color
Default color of background.
constexpr std::size_t default_num_pixels_per_tick_in_x_axis
Default number of pixels per tick in the x-axis.
constexpr int default_top_margin
Default top margin in pixels.
constexpr std::size_t default_num_pixels_per_tick_in_y_axis
Default number of pixels per tick in the y-axis.
constexpr auto default_axes_color
Default color of axes.
constexpr int default_bottom_margin
Default bottom margin in pixels.
constexpr int default_right_margin
Default right margin in pixels.
constexpr std::size_t default_max_num_sample_points
Default maximum number of points to sample in adaptive sampling.
Definition of RGBColor struct.