pub fn new(title: &str) -> Self {
        // Needed for initialization, see https://github.com/rust-lang/rust/issues/49147
        const POS_NONE: Option<Vec<f64>> = None;
        const TICK_NONE: Option<Vec<CString>> = None;

        // TODO(4bb4) question these defaults, maybe remove some of them
        Self {
            title: CString::new(title)
                .unwrap_or_else(|_| panic!("String contains internal null bytes: {}", title)),
            size: [DEFAULT_PLOT_SIZE_X, DEFAULT_PLOT_SIZE_Y],
            x_label: CString::new("").unwrap(),
            y_label: CString::new("").unwrap(),
            x_limits: None,
            y_limits: Default::default(),
            x_tick_positions: None,
            x_tick_labels: None,
            show_x_default_ticks: false,
            y_tick_positions: [POS_NONE; NUMBER_OF_Y_AXES],
            y_tick_labels: [TICK_NONE; NUMBER_OF_Y_AXES],
            show_y_default_ticks: [false; NUMBER_OF_Y_AXES],
            legend_configuration: None,
            plot_flags: PlotFlags::ANTIALIASED.bits() as sys::ImPlotFlags,
            x_flags: AxisFlags::NONE.bits() as sys::ImPlotAxisFlags,
            y_flags: [AxisFlags::NONE.bits() as sys::ImPlotAxisFlags; NUMBER_OF_Y_AXES],
        }
    }
/// Create a new plot with some defaults set. Does not draw anything yet.
/// Note that this uses antialiasing by default, unlike the C++ API. If you are seeing
/// artifacts or weird rendering, try disabling it.
///
/// # Panics
/// Will panic if the title string contains internal null bytes.
Create a new plot with some defaults set. Does not draw anything yet.
Note that this uses antialiasing by default, unlike the C++ API. If you are seeing
artifacts or weird rendering, try disabling it.
Create a new plot with some defaults set . Does not draw anything yet . Note that this uses antialiasing by default unlike the C ++ API . If you are seeing artifacts or weird rendering try disabling it .
pub fn new(title: &str) -> Self {
        // Needed for initialization, see https://github.com/rust-lang/rust/issues/49147
        const POS_NONE: Option<Vec<f64>> = None;
        const TICK_NONE: Option<Vec<CString>> = None;
        // TODO(4bb4) question these defaults, maybe remove some of them
        Self {
            title: CString::new(title)
                .unwrap_or_else(|_| panic!("String contains internal null bytes: {}", title)),
            size: [DEFAULT_PLOT_SIZE_X, DEFAULT_PLOT_SIZE_Y],
            x_label: CString::new("").unwrap(),
            y_label: CString::new("").unwrap(),
            x_limits: None,
            y_limits: Default::default(),
            x_tick_positions: None,
            x_tick_labels: None,
            show_x_default_ticks: false,
            y_tick_positions: [POS_NONE; NUMBER_OF_Y_AXES],
            y_tick_labels: [TICK_NONE; NUMBER_OF_Y_AXES],
            show_y_default_ticks: [false; NUMBER_OF_Y_AXES],
            legend_configuration: None,
            plot_flags: PlotFlags::ANTIALIASED.bits() as sys::ImPlotFlags,
            x_flags: AxisFlags::NONE.bits() as sys::ImPlotAxisFlags,
            y_flags: [AxisFlags::NONE.bits() as sys::ImPlotAxisFlags; NUMBER_OF_Y_AXES],
        }
    }
pub fn new ( title : & str ) -> Self { // Needed for initialization, see https://github.com/rust-lang/rust/issues/49147 const POS_NONE : Option < Vec < f64 > > = None ; const TICK_NONE : Option < Vec < CString > > = None ; // TODO(4bb4) question these defaults, maybe remove some of them Self { title : CString :: new ( title ) . unwrap_or_else ( | _ | panic ! ( " " title ) ) , size : [ DEFAULT_PLOT_SIZE_X , DEFAULT_PLOT_SIZE_Y ] , x_label : CString :: new ( " " ) . unwrap ( ) , y_label : CString :: new ( " " ) . unwrap ( ) , x_limits : None , y_limits : Default :: default ( ) , x_tick_positions : None , x_tick_labels : None , show_x_default_ticks : false , y_tick_positions : [ POS_NONE ; NUMBER_OF_Y_AXES ] , y_tick_labels : [ TICK_NONE ; NUMBER_OF_Y_AXES ] , show_y_default_ticks : [ false ; NUMBER_OF_Y_AXES ] , legend_configuration : None , plot_flags : PlotFlags :: ANTIALIASED . bits ( ) as sys :: ImPlotFlags , x_flags : AxisFlags :: NONE . bits ( ) as sys :: ImPlotAxisFlags , y_flags : [ AxisFlags :: NONE . bits ( ) as sys :: ImPlotAxisFlags ; NUMBER_OF_Y_AXES ] , } }
Create a new plot with some defaults set.
Create a new plot with some defaults set .
title
&str
title
&str
panics
Will panic if the title string contains internal null bytes.
Will panic if the title string contains internal null bytes .