pub struct Stream { /* private fields */ }Expand description
Implements functions to illustrate vector fields using streamlines and quiver plots
Implementations§
Source§impl Stream
impl Stream
Sourcepub fn draw<'a, T, U>(&mut self, xx: &'a T, yy: &'a T, dx: &'a T, dy: &'a T)
pub fn draw<'a, T, U>(&mut self, xx: &'a T, yy: &'a T, dx: &'a T, dy: &'a T)
Draws streamlines (stream plot)
Sourcepub fn draw_arrows<'a, T, U>(
&mut self,
xx: &'a T,
yy: &'a T,
dx: &'a T,
dy: &'a T,
)
pub fn draw_arrows<'a, T, U>( &mut self, xx: &'a T, yy: &'a T, dx: &'a T, dy: &'a T, )
Draws arrows (quiver plot)
Sourcepub fn set_color(&mut self, color: &str) -> &mut Self
pub fn set_color(&mut self, color: &str) -> &mut Self
Sets the line color (quiver or streamlines)
Sourcepub fn set_streamline_linewidth(&mut self, width: f64) -> &mut Self
pub fn set_streamline_linewidth(&mut self, width: f64) -> &mut Self
Sets the line width of streamlines
Sourcepub fn set_streamplot_arrow_style(&mut self, style: &str) -> &mut Self
pub fn set_streamplot_arrow_style(&mut self, style: &str) -> &mut Self
Sets the arrow style
Options:
- “
-” – Curve : None - “
->” – CurveB : head_length=0.4,head_width=0.2 - “
-[” – BracketB : widthB=1.0,lengthB=0.2,angleB=None - “
-|>” – CurveFilledB : head_length=0.4,head_width=0.2 - “
<-” – CurveA : head_length=0.4,head_width=0.2 - “
<->” – CurveAB : head_length=0.4,head_width=0.2 - “
<|-” – CurveFilledA : head_length=0.4,head_width=0.2 - “
<|-|>” – CurveFilledAB : head_length=0.4,head_width=0.2 - “
]-” – BracketA : widthA=1.0,lengthA=0.2,angleA=None - “
]-[” – BracketAB : widthA=1.0,lengthA=0.2,angleA=None,widthB=1.0,lengthB=0.2,angleB=None - “
fancy” – Fancy : head_length=0.4,head_width=0.4,tail_width=0.4 - “
simple” – Simple : head_length=0.5,head_width=0.5,tail_width=0.2 - “
wedge” – Wedge : tail_width=0.3,shrink_factor=0.5 - “
|-|” – BarAB : widthA=1.0,angleA=None,widthB=1.0,angleB=None - As defined in https://matplotlib.org/stable/api/_as_gen/matplotlib.patches.FancyArrowPatch.html
Sourcepub fn set_streamplot_density(&mut self, density: f64) -> &mut Self
pub fn set_streamplot_density(&mut self, density: f64) -> &mut Self
Sets the density of streamlines
Sourcepub fn set_streamplot_extra(&mut self, extra: &str) -> &mut Self
pub fn set_streamplot_extra(&mut self, extra: &str) -> &mut Self
Sets extra options for streamlines
See https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.streamplot.html
Sourcepub fn set_quiver_inv_scale(&mut self, scale: f64) -> &mut Self
pub fn set_quiver_inv_scale(&mut self, scale: f64) -> &mut Self
Sets the quiver inverse scale
Sourcepub fn set_quiver_pivot(&mut self, pivot: &str) -> &mut Self
pub fn set_quiver_pivot(&mut self, pivot: &str) -> &mut Self
Sets the quiver pivot
Options: ‘tail’, ‘mid’, ‘middle’, ‘tip’
Default = ‘tail’
Sourcepub fn set_quiver_extra(&mut self, extra: &str) -> &mut Self
pub fn set_quiver_extra(&mut self, extra: &str) -> &mut Self
Sets extra options for quiver
See https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.quiver.html
Trait Implementations§
Source§impl GraphMaker for Stream
impl GraphMaker for Stream
Source§fn get_buffer<'a>(&'a self) -> &'a String
fn get_buffer<'a>(&'a self) -> &'a String
Returns the text buffer with Python3 commands
Source§fn clear_buffer(&mut self)
fn clear_buffer(&mut self)
Clear the text buffer with Python commands
Auto Trait Implementations§
impl Freeze for Stream
impl RefUnwindSafe for Stream
impl Send for Stream
impl Sync for Stream
impl Unpin for Stream
impl UnwindSafe for Stream
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