pub struct GnuplotPointSettings {
pub color: ColorRGB,
pub frame: bool,
pub frame_color: ColorRGB,
/* private fields */
}
Expand description
§Defines gnuplot point
- Note that most of the fields are public and can be accessed directly
Fields§
§color: ColorRGB
Color of the point
frame: bool
should the point have a frame?
frame_color: ColorRGB
Which color should the frame be?
Implementations§
Source§impl GnuplotPointSettings
impl GnuplotPointSettings
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new instance of GnuplotPointSettings
- same as GnuplotPointSettings::default()
Sourcepub fn color(&mut self, color: ColorRGB) -> &mut Self
pub fn color(&mut self, color: ColorRGB) -> &mut Self
§Choose the color for the point
- default color is blue
Sourcepub fn size(&mut self, size: f32) -> &mut Self
pub fn size(&mut self, size: f32) -> &mut Self
§Choose the size of the point
- size has to be finite
- size has to be >= 0.0
Otherwise the old size will be silently kept
Sourcepub fn frame(&mut self, active: bool) -> &mut Self
pub fn frame(&mut self, active: bool) -> &mut Self
Should there be a frame around the point ? This is good for better visibility if you do not know the color of the background, or the background color changes
Sourcepub fn frame_color(&mut self, color: ColorRGB) -> &mut Self
pub fn frame_color(&mut self, color: ColorRGB) -> &mut Self
§Which color should the frame have?
*default color is black
Sourcepub fn legend<S: Into<String>>(&mut self, legend: S) -> &mut Self
pub fn legend<S: Into<String>>(&mut self, legend: S) -> &mut Self
§Change the legend entry
- This will be the title of the legend for this point(s)
- will be set to “Invalid character encountered” if it contains a “ or newline character
Sourcepub fn get_legend(&self) -> &str
pub fn get_legend(&self) -> &str
§Get entry for legend
This will be the title of the legend for this point(s)
Trait Implementations§
Source§impl Clone for GnuplotPointSettings
impl Clone for GnuplotPointSettings
Source§fn clone(&self) -> GnuplotPointSettings
fn clone(&self) -> GnuplotPointSettings
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for GnuplotPointSettings
impl Debug for GnuplotPointSettings
Source§impl Default for GnuplotPointSettings
impl Default for GnuplotPointSettings
Source§impl<'de> Deserialize<'de> for GnuplotPointSettings
impl<'de> Deserialize<'de> for GnuplotPointSettings
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for GnuplotPointSettings
impl RefUnwindSafe for GnuplotPointSettings
impl Send for GnuplotPointSettings
impl Sync for GnuplotPointSettings
impl Unpin for GnuplotPointSettings
impl UnwindSafe for GnuplotPointSettings
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more