Struct net_ensembles::sampling::heatmap::GnuplotSettings
source · [−]pub struct GnuplotSettings {
pub x_label: String,
pub x_axis: Option<GnuplotAxis>,
pub y_label: String,
pub y_axis: Option<GnuplotAxis>,
pub title: String,
pub terminal: GnuplotTerminal,
pub palette: GnuplotPalette,
pub size: String,
}
Expand description
Settings for gnuplot
- implements default
- implements builder pattern for itself
Fields
x_label: String
x label for gnuplot
x_axis: Option<GnuplotAxis>
how to format the labels of the x axis?
y_label: String
y label for gnuplot
y_axis: Option<GnuplotAxis>
how to format the labels of the y axis?
title: String
title for gnuplot
terminal: GnuplotTerminal
which terminal to use for gnuplot
palette: GnuplotPalette
Color palette for heatmap
size: String
Size of the terminal
- Anything gnuplot accepts (e.g. “2cm, 2.9cm”) is acceptable
Note
the code does not check, if your input for size
makes any sense
Implementations
sourceimpl GnuplotSettings
impl GnuplotSettings
sourcepub fn size<S>(&mut self, size: S) -> &mut GnuplotSettingswhere
S: Into<String>,
pub fn size<S>(&mut self, size: S) -> &mut GnuplotSettingswhere
S: Into<String>,
Builder pattern - set size of terminal
- Anything gnuplot accepts (e.g. “2cm, 2.9cm”) is acceptable
Note
the code does not check, if your input for size
makes any sense
sourcepub fn x_label<S>(&mut self, x_label: S) -> &mut GnuplotSettingswhere
S: Into<String>,
pub fn x_label<S>(&mut self, x_label: S) -> &mut GnuplotSettingswhere
S: Into<String>,
sourcepub fn y_label<S>(&mut self, y_label: S) -> &mut GnuplotSettingswhere
S: Into<String>,
pub fn y_label<S>(&mut self, y_label: S) -> &mut GnuplotSettingswhere
S: Into<String>,
sourcepub fn title<S>(&mut self, title: S) -> &mut GnuplotSettingswhere
S: Into<String>,
pub fn title<S>(&mut self, title: S) -> &mut GnuplotSettingswhere
S: Into<String>,
sourcepub fn terminal(&mut self, terminal: GnuplotTerminal) -> &mut GnuplotSettings
pub fn terminal(&mut self, terminal: GnuplotTerminal) -> &mut GnuplotSettings
sourcepub fn palette(&mut self, palette: GnuplotPalette) -> &mut GnuplotSettings
pub fn palette(&mut self, palette: GnuplotPalette) -> &mut GnuplotSettings
sourcepub fn new() -> GnuplotSettings
pub fn new() -> GnuplotSettings
Create new, default, GnuplotSettings
sourcepub fn x_axis(&mut self, axis: GnuplotAxis) -> &mut GnuplotSettings
pub fn x_axis(&mut self, axis: GnuplotAxis) -> &mut GnuplotSettings
Set x_axis - See GnuplotAxis or try it out
sourcepub fn y_axis(&mut self, axis: GnuplotAxis) -> &mut GnuplotSettings
pub fn y_axis(&mut self, axis: GnuplotAxis) -> &mut GnuplotSettings
Set y_axis - See GnuplotAxis or try it out
sourcepub fn write_heatmap<F, W>(
&self,
writer: W,
closure: F,
x_len: usize,
y_len: usize
) -> Result<(), Error>where
W: Write,
F: FnOnce(&mut W) -> Result<(), Error>,
pub fn write_heatmap<F, W>(
&self,
writer: W,
closure: F,
x_len: usize,
y_len: usize
) -> Result<(), Error>where
W: Write,
F: FnOnce(&mut W) -> Result<(), Error>,
Write a heatmap with the given gnuplot Settings
closure
has to write the heatmap. It must writey_len
rows withx_len
values each, where the latter values are seperated by a space. This data will be used for the heatmap.x_len
: The number of entrys in each column, that you promise theclosure
will writey_len
: The number of columns you promise that theclosure
will write
Trait Implementations
sourceimpl Clone for GnuplotSettings
impl Clone for GnuplotSettings
sourcefn clone(&self) -> GnuplotSettings
fn clone(&self) -> GnuplotSettings
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for GnuplotSettings
impl Debug for GnuplotSettings
sourceimpl Default for GnuplotSettings
impl Default for GnuplotSettings
sourcefn default() -> GnuplotSettings
fn default() -> GnuplotSettings
Returns the “default value” for a type. Read more
sourceimpl<'de> Deserialize<'de> for GnuplotSettings
impl<'de> Deserialize<'de> for GnuplotSettings
sourcefn deserialize<__D>(
__deserializer: __D
) -> Result<GnuplotSettings, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D
) -> Result<GnuplotSettings, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl Serialize for GnuplotSettings
impl Serialize for GnuplotSettings
sourcefn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations
impl RefUnwindSafe for GnuplotSettings
impl Send for GnuplotSettings
impl Sync for GnuplotSettings
impl Unpin for GnuplotSettings
impl UnwindSafe for GnuplotSettings
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
impl<S, T> CastFloat<T> for Swhere
T: ConvFloat<S>,
fn cast_trunc(self) -> T
fn cast_trunc(self) -> T
Cast to integer, truncating Read more
fn cast_nearest(self) -> T
fn cast_nearest(self) -> T
Cast to the nearest integer Read more
fn cast_floor(self) -> T
fn cast_floor(self) -> T
Cast the floor to an integer Read more
fn try_cast_trunc(self) -> Result<T, Error>
fn try_cast_trunc(self) -> Result<T, Error>
Try converting to integer with truncation Read more
fn try_cast_nearest(self) -> Result<T, Error>
fn try_cast_nearest(self) -> Result<T, Error>
Try converting to the nearest integer Read more
fn try_cast_floor(self) -> Result<T, Error>
fn try_cast_floor(self) -> Result<T, Error>
Try converting the floor to an integer Read more
fn try_cast_ceil(self) -> Result<T, Error>
fn try_cast_ceil(self) -> Result<T, Error>
Try convert the ceiling to an integer Read more