22#include <fmt/format.h>
26namespace func_sketch::plotter {
63 "Tick label font size must be non-negative");
119 "Number of sample points must be at least 2");
128 "Number of sample points must be at least 2.");
132 fmt::format(
"Number of sample points must be at most {}",
142 "Maximum coordinate change rate must be positive.");
151 "Slope change threshold must be positive.");
160 fmt::format(
"Minimum parameter change rate must be at least {}",
170 "Number of pixels per tick in the x-axis must be positive.");
179 "Number of pixels per tick in the y-axis must be positive.");
Class of exceptions for invalid arguments.
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.
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_
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.
std::size_t num_pixels_per_tick_in_x_axis() const noexcept
Get the number of pixels per tick in the x-axis.
int bottom_margin_
Bottom margin of plots in pixels.
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.
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.
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.
int left_margin() const noexcept
Get the left margin of plots in pixels.
int top_margin_
Top margin of plots in pixels.
const RGBColor & axes_color() const noexcept
Get the color of axes.
Definition of exception classes.
Definition of PlotConfig class.
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 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...