plotpy icon indicating copy to clipboard operation
plotpy copied to clipboard

Design principle of plotpy

Open wangjiawen2013 opened this issue 1 year ago • 0 comments

Hi, I want to add some scientific plots such as boxplot, violin plot, probality density plot and so on. So I wanna know more about the design principle of plotpy. There are a lot of parameters in matplotlib, it's hard to include all these parameters in plotpy, though many parameters are rarely used. I notice that there is a parameter called extra in barplot.rs:

pub struct Barplot {
    label: String,             // Name of this bar in the legend
    colors: Vec<String>,       // Colors for each bar
    width: f64,                // Width of the bars
    bottom: Vec<f64>,          // bottom coordinates to stack bars
    with_text: Option<String>, // Text to be added to each bar (aka, bar_label)
    horizontal: bool,          // Horizontal barplot
    x_errors: Vec<f64>,        // Shows x-error icons on horizontal bars
    extra: String,             // Extra commands (comma separated)
    buffer: String,            // buffer
}

So we can set any parameters used in matplotlib barplot using extra. But not all structs in plotpy have extra. So could you tell about the parameter setting strategy and design principle of plotpy ? Then we can add plotting functions in consistent with your style as possible as we can.

wangjiawen2013 avatar Aug 23 '24 13:08 wangjiawen2013