#[derive(Debug, Clone, Copy)]
pub enum PlotType {
Line,
Scatter,
Points,
}
#[derive(Debug, Clone, Copy)]
pub enum OutputFormat {
Terminal,
TextFile,
}
#[derive(Debug, Clone)]
pub struct PlotConfig {
pub title: String,
pub x_label: String,
pub y_label: String,
pub width: u32,
pub height: u32,
pub plot_type: PlotType,
pub format: OutputFormat,
}
impl Default for PlotConfig {
fn default() -> Self {
PlotConfig {
title: "Plot".to_string(),
x_label: "X".to_string(),
y_label: "Y".to_string(),
width: 80,
height: 25,
plot_type: PlotType::Line,
format: OutputFormat::Terminal,
}
}
}
#[derive(Debug, Clone, Copy)]
pub enum PlotKind {
Line,
Scatter,
Bar,
Histogram,
BoxPlot,
Area,
}
#[derive(Debug, Clone, Copy)]
pub enum OutputType {
PNG,
SVG,
}
#[derive(Debug, Clone)]
pub struct PlotSettings {
pub title: String,
pub x_label: String,
pub y_label: String,
pub width: u32,
pub height: u32,
pub plot_kind: PlotKind,
pub output_type: OutputType,
pub show_legend: bool,
pub show_grid: bool,
pub color_palette: Vec<(u8, u8, u8)>,
}
impl Default for PlotSettings {
fn default() -> Self {
PlotSettings {
title: "Plot".to_string(),
x_label: "X".to_string(),
y_label: "Y".to_string(),
width: 800,
height: 600,
plot_kind: PlotKind::Line,
output_type: OutputType::PNG,
show_legend: true,
show_grid: true,
color_palette: vec![
(0, 123, 255), (255, 99, 71), (46, 204, 113), (255, 193, 7), (142, 68, 173), (52, 152, 219), (243, 156, 18), (211, 84, 0), ],
}
}
}