238 lines
62 KiB
HTML
238 lines
62 KiB
HTML
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Driver structure that calls Python"><title>Plot in plotpy - Rust</title><script>if(window.location.protocol!=="file:")document.head.insertAdjacentHTML("beforeend","SourceSerif4-Regular-6b053e98.ttf.woff2,FiraSans-Regular-0fe48ade.woff2,FiraSans-Medium-e1aa3f0a.woff2,SourceCodePro-Regular-8badfe75.ttf.woff2,SourceCodePro-Semibold-aa29a496.ttf.woff2".split(",").map(f=>`<link rel="preload" as="font" type="font/woff2" crossorigin href="../static.files/${f}">`).join(""))</script><link rel="stylesheet" href="../static.files/normalize-9960930a.css"><link rel="stylesheet" href="../static.files/rustdoc-42caa33d.css"><meta name="rustdoc-vars" data-root-path="../" data-static-root-path="../static.files/" data-current-crate="plotpy" data-themes="" data-resource-suffix="" data-rustdoc-version="1.84.0 (9fc6b4312 2025-01-07)" data-channel="1.84.0" data-search-js="search-92e6798f.js" data-settings-js="settings-0f613d39.js" ><script src="../static.files/storage-59e33391.js"></script><script defer src="sidebar-items.js"></script><script defer src="../static.files/main-5f194d8c.js"></script><noscript><link rel="stylesheet" href="../static.files/noscript-893ab5e7.css"></noscript><link rel="alternate icon" type="image/png" href="../static.files/favicon-32x32-6580c154.png"><link rel="icon" type="image/svg+xml" href="../static.files/favicon-044be391.svg"></head><body class="rustdoc struct"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="mobile-topbar"><button class="sidebar-menu-toggle" title="show sidebar"></button></nav><nav class="sidebar"><div class="sidebar-crate"><h2><a href="../plotpy/index.html">plotpy</a><span class="version">0.5.1</span></h2></div><div class="sidebar-elems"><section id="rustdoc-toc"><h2 class="location"><a href="#">Plot</a></h2><h3><a href="#">Sections</a></h3><ul class="block top-toc"><li><a href="#example" title="Example">Example</a></li></ul><h3><a href="#implementations">Methods</a></h3><ul class="block method"><li><a href="#method.add" title="add">add</a></li><li><a href="#method.clear_current_axes" title="clear_current_axes">clear_current_axes</a></li><li><a href="#method.clear_current_figure" title="clear_current_figure">clear_current_figure</a></li><li><a href="#method.extra" title="extra">extra</a></li><li><a href="#method.grid_and_labels" title="grid_and_labels">grid_and_labels</a></li><li><a href="#method.grid_labels_legend" title="grid_labels_legend">grid_labels_legend</a></li><li><a href="#method.legend" title="legend">legend</a></li><li><a href="#method.new" title="new">new</a></li><li><a href="#method.save" title="save">save</a></li><li><a href="#method.save_and_show" title="save_and_show">save_and_show</a></li><li><a href="#method.set_align_labels" title="set_align_labels">set_align_labels</a></li><li><a href="#method.set_camera" title="set_camera">set_camera</a></li><li><a href="#method.set_equal_axes" title="set_equal_axes">set_equal_axes</a></li><li><a href="#method.set_figure_size_inches" title="set_figure_size_inches">set_figure_size_inches</a></li><li><a href="#method.set_figure_size_points" title="set_figure_size_points">set_figure_size_points</a></li><li><a href="#method.set_frame_border" title="set_frame_border">set_frame_border</a></li><li><a href="#method.set_frame_borders" title="set_frame_borders">set_frame_borders</a></li><li><a href="#method.set_gaps" title="set_gaps">set_gaps</a></li><li><a href="#method.set_gridspec" title="set_gridspec">set_gridspec</a></li><li><a href="#method.set_hide_axes" title="set_hide_axes">set_hide_axes</a></li><li><a href="#method.set_horizontal_gap" title="set_horizontal_gap">set_horizontal_gap</a></li><li><a href="#method.set_inv_x" title="set_inv_x">set_inv_x</a></li><li><a href="#method.set_inv_y" title="set_inv_y">set_inv_y</a></li><li><a href="#method.set_label_x" title="set_label_x">set_label_x</a></li><li><a href="#method.set_label_y" title="set_label_y">set_label_y</a></li><li><a href="#method.set_labels" title="set_labels">set_labels</a></li><li><a href="#method.set_log_x" title="set_log_x">set_log_x</a></li><li><a href="#method.set_log_y" title="set_log_y">set_log_y</a></li><li><a href="#method.set_num_ticks_x" title="set_num_ticks_x">set_num_ticks_x</a></li><li><a href="#method.set_num_ticks_y" title="set_num_ticks_y">set_num_ticks_y</a></li><li><a href="#method.set_range" title="set_range">set_range</a></li><li><a href="#method.set_range_3d" title="set_range_3d">set_range_3d</a></li><li><a href="#method.set_range_from_vec" title="set_range_from_vec">set_range_from_vec</a></li><li><a href="#method.set_rotation_ticks_x" title="set_rotation_ticks_x">set_rotation_ticks_x</a></li><li><a href="#method.set_rotation_ticks_y" title="set_rotation_ticks_y">set_rotation_ticks_y</a></li><li><a href="#method.set_show_errors" title="set_show_errors">set_show_errors</a></li><li><a href="#method.set_subplot" title="set_subplot">set_subplot</a></li><li><a href="#method.set_subplot_grid" title="set_subplot_grid">set_subplot_grid</a></li><li><a href="#method.set_super_title" title="set_super_title">set_super_title</a></li><li><a href="#method.set_ticks_x" title="set_ticks_x">set_ticks_x</a></li><li><a href="#method.set_ticks_x_multiple_of_pi" title="set_ticks_x_multiple_of_pi">set_ticks_x_multiple_of_pi</a></li><li><a href="#method.set_ticks_y" title="set_ticks_y">set_ticks_y</a></li><li><a href="#method.set_ticks_y_multiple_of_pi" title="set_ticks_y_multiple_of_pi">set_ticks_y_multiple_of_pi</a></li><li><a href="#method.set_title" title="set_title">set_title</a></li><li><a href="#method.set_vertical_gap" title="set_vertical_gap">set_vertical_gap</a></li><li><a href="#method.set_xmax" title="set_xmax">set_xmax</a></li><li><a href="#method.set_xmin" title="set_xmin">set_xmin</a></li><li><a href="#method.set_xrange" title="set_xrange">set_xrange</a></li><li><a href="#method.set_ymax" title="set_ymax">set_ymax</a></li><li><a href="#method.set_ymin" title="set_ymin">set_ymin</a></li><li><a href="#method.set_yrange" title="set_yrange">set_yrange</a></li></ul><h3><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><ul class="block synthetic-implementation"><li><a href="#impl-Freeze-for-Plot" title="Freeze">Freeze</a></li><li><a href="#impl-RefUnwindSafe-for-Plot" title="RefUnwindSafe">RefUnwindSafe</a></li><li><a href="#impl-Send-for-Plot" title="Send">Send</a></li><li><a href="#impl-Sync-for-Plot" title="Sync">Sync</a></li><li><a href="#impl-Unpin-for-Plot" title="Unpin">Unpin</a></li><li><a href="#impl-UnwindSafe-for-Plot" title="UnwindSafe">UnwindSafe</a></li></ul><h3><a href="#blanket-implementations">Blanket Implementations</a></h3><ul class="block blanket-implementation"><li><a href="#impl-Any-for-T" title="Any">Any</a></li><li><a href="#impl-Borrow%3CT%3E-for-T" title="Borrow<T>">Borrow<T></a></li><li><a href="#impl-BorrowMut%3CT%3E-for-T" title="BorrowMut<T>">BorrowMut<T></a></li><li><a href="#impl-From%3CT%3E-for-T" title="From<T>">From<T></a></li><li><a href="#impl-Into%3CU%3E-for-T" title="Into<U>">Into<U></a></li><li><a href="#impl-TryFrom%3CU%3E-for-T" title="TryFrom<U>">TryFrom<U></a></li><li><a href="#impl-TryInto%3CU%3E-for-T" title="TryInto<U>">TryInto<U></a></li></ul></section><div id="rustdoc-modnav"><h2 class="in-crate"><a href="index.html">In crate plotpy</a></h2></div></div></nav><div class="sidebar-resizer"></div><main><div class="width-limiter"><rustdoc-search></rustdoc-search><section id="main-content" class="content"><div class="main-heading"><span class="rustdoc-breadcrumbs"><a href="index.html">plotpy</a></span><h1>Struct <span class="struct">Plot</span><button id="copy-path" title="Copy item path to clipboard">Copy item path</button></h1><rustdoc-toolbar></rustdoc-toolbar><span class="sub-heading"><a class="src" href="../src/plotpy/plot.rs.html#86-89">Source</a> </span></div><pre class="rust item-decl"><code>pub struct Plot { <span class="comment">/* private fields */</span> }</code></pre><details class="toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Driver structure that calls Python</p>
|
||
<h2 id="example"><a class="doc-anchor" href="#example">§</a>Example</h2>
|
||
<div class="example-wrap"><pre class="rust rust-example-rendered"><code><span class="kw">use </span>plotpy::{linspace, Curve, Plot, StrError};
|
||
|
||
<span class="kw">fn </span>main() -> <span class="prelude-ty">Result</span><(), StrError> {
|
||
<span class="comment">// generate (x,y) points
|
||
</span><span class="kw">let </span>n = <span class="number">11</span>;
|
||
<span class="kw">let </span>x = linspace(-<span class="number">1.0</span>, <span class="number">1.0</span>, n);
|
||
<span class="kw">let </span>y1 = x.clone();
|
||
<span class="kw">let </span>y2: Vec<<span class="kw">_</span>> = x.iter().map(|v| f64::abs(<span class="kw-2">*</span>v)).collect();
|
||
<span class="kw">let </span>y3: Vec<<span class="kw">_</span>> = x.iter().map(|v| f64::exp(<span class="number">1.0 </span>+ <span class="kw-2">*</span>v) - <span class="number">1.0</span>).collect();
|
||
<span class="kw">let </span>y4: Vec<<span class="kw">_</span>> = x.iter().map(|v| f64::sqrt(<span class="number">1.0 </span>+ <span class="kw-2">*</span>v)).collect();
|
||
|
||
<span class="comment">// configure and draw curves
|
||
</span><span class="kw">let </span><span class="kw-2">mut </span>curve1 = Curve::new();
|
||
<span class="kw">let </span><span class="kw-2">mut </span>curve2 = Curve::new();
|
||
<span class="kw">let </span><span class="kw-2">mut </span>curve3 = Curve::new();
|
||
<span class="kw">let </span><span class="kw-2">mut </span>curve4 = Curve::new();
|
||
curve1.set_label(<span class="string">"y = x"</span>);
|
||
curve2.set_label(<span class="string">"y = |x|"</span>).set_line_color(<span class="string">"#cd0000"</span>);
|
||
curve3.set_label(<span class="string">"y = exp(1+x)-1"</span>).set_line_color(<span class="string">"#e79955"</span>);
|
||
curve4.set_label(<span class="string">"y = sqrt(1+x)"</span>).set_line_color(<span class="string">"#b566ab"</span>);
|
||
curve1.draw(<span class="kw-2">&</span>x, <span class="kw-2">&</span>y1);
|
||
curve2.draw(<span class="kw-2">&</span>x, <span class="kw-2">&</span>y2);
|
||
curve3.draw(<span class="kw-2">&</span>x, <span class="kw-2">&</span>y3);
|
||
curve4.draw(<span class="kw-2">&</span>x, <span class="kw-2">&</span>y4);
|
||
|
||
<span class="comment">// configure plot
|
||
</span><span class="kw">let </span><span class="kw-2">mut </span>plot = Plot::new();
|
||
plot.set_super_title(<span class="string">"FOUR CURVES"</span>, <span class="prelude-val">None</span>).set_gaps(<span class="number">0.35</span>, <span class="number">0.5</span>);
|
||
|
||
<span class="comment">// add curve to subplot
|
||
</span>plot.set_subplot(<span class="number">2</span>, <span class="number">2</span>, <span class="number">1</span>)
|
||
.set_title(<span class="string">"first"</span>)
|
||
.add(<span class="kw-2">&</span>curve1)
|
||
.grid_labels_legend(<span class="string">"x"</span>, <span class="string">"y"</span>)
|
||
.set_equal_axes(<span class="bool-val">true</span>);
|
||
|
||
<span class="comment">// add curve to subplot
|
||
</span>plot.set_subplot(<span class="number">2</span>, <span class="number">2</span>, <span class="number">2</span>)
|
||
.set_title(<span class="string">"second"</span>)
|
||
.add(<span class="kw-2">&</span>curve2)
|
||
.grid_labels_legend(<span class="string">"x"</span>, <span class="string">"y"</span>);
|
||
|
||
<span class="comment">// add curve to subplot
|
||
</span>plot.set_subplot(<span class="number">2</span>, <span class="number">2</span>, <span class="number">3</span>)
|
||
.set_title(<span class="string">"third"</span>)
|
||
.add(<span class="kw-2">&</span>curve3)
|
||
.set_range(-<span class="number">1.0</span>, <span class="number">1.0</span>, <span class="number">0.0</span>, <span class="number">6.0</span>)
|
||
.grid_labels_legend(<span class="string">"x"</span>, <span class="string">"y"</span>);
|
||
|
||
<span class="comment">// add curve to subplot
|
||
</span>plot.set_subplot(<span class="number">2</span>, <span class="number">2</span>, <span class="number">4</span>)
|
||
.set_title(<span class="string">"fourth"</span>)
|
||
.add(<span class="kw-2">&</span>curve4)
|
||
.grid_labels_legend(<span class="string">"x"</span>, <span class="string">"y"</span>);
|
||
|
||
<span class="comment">// save figure
|
||
</span>plot.save(<span class="string">"/tmp/plotpy/doc_tests/doc_plot.svg"</span>)<span class="question-mark">?</span>;
|
||
<span class="prelude-val">Ok</span>(())
|
||
}</code></pre></div>
|
||
<p><img src="https://raw.githubusercontent.com/cpmech/plotpy/main/figures/doc_plot.svg" alt="doc_plot.svg" /></p>
|
||
<p>See also integration tests in the <a href="https://github.com/cpmech/plotpy/tree/main/tests">tests directory</a></p>
|
||
</div></details><h2 id="implementations" class="section-header">Implementations<a href="#implementations" class="anchor">§</a></h2><div id="implementations-list"><details class="toggle implementors-toggle" open><summary><section id="impl-Plot" class="impl"><a class="src rightside" href="../src/plotpy/plot.rs.html#91-746">Source</a><a href="#impl-Plot" class="anchor">§</a><h3 class="code-header">impl <a class="struct" href="struct.Plot.html" title="struct plotpy::Plot">Plot</a></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.new" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#93-98">Source</a><h4 class="code-header">pub fn <a href="#method.new" class="fn">new</a>() -> Self</h4></section></summary><div class="docblock"><p>Creates new Plot object</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.add" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#101-104">Source</a><h4 class="code-header">pub fn <a href="#method.add" class="fn">add</a>(&mut self, graph: &dyn <a class="trait" href="trait.GraphMaker.html" title="trait plotpy::GraphMaker">GraphMaker</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Adds new graph entity</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.save" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#115-120">Source</a><h4 class="code-header">pub fn <a href="#method.save" class="fn">save</a><S>(&self, figure_path: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&S</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.unit.html">()</a>, <a class="type" href="type.StrError.html" title="type plotpy::StrError">StrError</a>><div class="where">where
|
||
S: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="https://doc.rust-lang.org/1.84.0/std/ffi/os_str/struct.OsStr.html" title="struct std::ffi::os_str::OsStr">OsStr</a>> + ?<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Calls python3 and saves the python script and figure</p>
|
||
<h5 id="input"><a class="doc-anchor" href="#input">§</a>Input</h5>
|
||
<ul>
|
||
<li><code>figure_path</code> – may be a String, &str, or Path</li>
|
||
</ul>
|
||
<h5 id="note"><a class="doc-anchor" href="#note">§</a>Note</h5>
|
||
<p>Call <code>set_show_errors</code> to configure how the errors (if any) are printed.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.save_and_show" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#131-136">Source</a><h4 class="code-header">pub fn <a href="#method.save_and_show" class="fn">save_and_show</a><S>(&self, figure_path: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&S</a>) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.unit.html">()</a>, <a class="type" href="type.StrError.html" title="type plotpy::StrError">StrError</a>><div class="where">where
|
||
S: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.AsRef.html" title="trait core::convert::AsRef">AsRef</a><<a class="struct" href="https://doc.rust-lang.org/1.84.0/std/ffi/os_str/struct.OsStr.html" title="struct std::ffi::os_str::OsStr">OsStr</a>> + ?<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h4></section></summary><div class="docblock"><p>Calls python3, saves the python script and figure, and show the plot window</p>
|
||
<h5 id="input-1"><a class="doc-anchor" href="#input-1">§</a>Input</h5>
|
||
<ul>
|
||
<li><code>figure_path</code> – may be a String, &str, or Path</li>
|
||
</ul>
|
||
<h5 id="note-1"><a class="doc-anchor" href="#note-1">§</a>Note</h5>
|
||
<p>Call <code>set_show_errors</code> to configure how the errors (if any) are printed.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.clear_current_axes" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#139-142">Source</a><h4 class="code-header">pub fn <a href="#method.clear_current_axes" class="fn">clear_current_axes</a>(&mut self) -> &mut Self</h4></section></summary><div class="docblock"><p>Clears the current axes</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.clear_current_figure" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#145-148">Source</a><h4 class="code-header">pub fn <a href="#method.clear_current_figure" class="fn">clear_current_figure</a>(&mut self) -> &mut Self</h4></section></summary><div class="docblock"><p>Clears current figure</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.legend" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#151-155">Source</a><h4 class="code-header">pub fn <a href="#method.legend" class="fn">legend</a>(&mut self) -> &mut Self</h4></section></summary><div class="docblock"><p>Adds legend to plot (see Legend for further options)</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.grid_and_labels" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#158-169">Source</a><h4 class="code-header">pub fn <a href="#method.grid_and_labels" class="fn">grid_and_labels</a>(&mut self, xlabel: &<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>, ylabel: &<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Adds grid and labels</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.grid_labels_legend" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#172-183">Source</a><h4 class="code-header">pub fn <a href="#method.grid_labels_legend" class="fn">grid_labels_legend</a>(&mut self, xlabel: &<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>, ylabel: &<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Adds grid, labels, and legend</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_show_errors" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#186-189">Source</a><h4 class="code-header">pub fn <a href="#method.set_show_errors" class="fn">set_show_errors</a>(&mut self, option: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets flag to print python errors (if any) when calling save</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_subplot" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#198-201">Source</a><h4 class="code-header">pub fn <a href="#method.set_subplot" class="fn">set_subplot</a>(&mut self, row: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.usize.html">usize</a>, col: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.usize.html">usize</a>, index: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.usize.html">usize</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Configures subplots</p>
|
||
<h5 id="input-2"><a class="doc-anchor" href="#input-2">§</a>Input</h5>
|
||
<ul>
|
||
<li><code>row</code> – number of rows in the subplot grid</li>
|
||
<li><code>col</code> – number of columns in the subplot grid</li>
|
||
<li><code>index</code> – activate current subplot; <strong>indices start at one</strong> (1-based)</li>
|
||
</ul>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_gridspec" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#212-220">Source</a><h4 class="code-header">pub fn <a href="#method.set_gridspec" class="fn">set_gridspec</a>(
|
||
&mut self,
|
||
grid_handle: &<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>,
|
||
row: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.usize.html">usize</a>,
|
||
col: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.usize.html">usize</a>,
|
||
options: &<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>,
|
||
) -> &mut Self</h4></section></summary><div class="docblock"><p>Configures subplots using GridSpec</p>
|
||
<h5 id="input-3"><a class="doc-anchor" href="#input-3">§</a>Input</h5>
|
||
<ul>
|
||
<li><code>grid_handle</code> – an identifier for GridSpec to be used later with <a href="struct.Plot.html#method.set_subplot_grid" title="method plotpy::Plot::set_subplot_grid">Plot::set_subplot_grid</a></li>
|
||
<li><code>row</code> – number of rows in the grid</li>
|
||
<li><code>col</code> – number of columns in the grid</li>
|
||
<li><code>options</code> – (may be empty) Comma separated options. Example <code>"wspace=0,hspace=0.35"</code>.
|
||
See <a href="https://matplotlib.org/stable/api/_as_gen/matplotlib.gridspec.GridSpec.html">https://matplotlib.org/stable/api/_as_gen/matplotlib.gridspec.GridSpec.html</a></li>
|
||
</ul>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_subplot_grid" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#231-239">Source</a><h4 class="code-header">pub fn <a href="#method.set_subplot_grid" class="fn">set_subplot_grid</a>(
|
||
&mut self,
|
||
grid_handle: &<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>,
|
||
i_range: &<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>,
|
||
j_range: &<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>,
|
||
) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets a subplot configured via GridSpec</p>
|
||
<p>See function <a href="struct.Plot.html#method.set_gridspec" title="method plotpy::Plot::set_gridspec">Plot::set_gridspec</a></p>
|
||
<h5 id="input-4"><a class="doc-anchor" href="#input-4">§</a>Input</h5>
|
||
<ul>
|
||
<li><code>grid_handle</code> – an identifier for GridSpec defined by <a href="struct.Plot.html#method.set_gridspec" title="method plotpy::Plot::set_gridspec">Plot::set_gridspec</a></li>
|
||
<li><code>i_range</code> – the <strong>zero-based</strong> row index or range such as “0” or “0:2”</li>
|
||
<li><code>j_range</code> – the <strong>zero-based</strong> column index or range such as “0” or “0:2”</li>
|
||
</ul>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_rotation_ticks_x" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#242-250">Source</a><h4 class="code-header">pub fn <a href="#method.set_rotation_ticks_x" class="fn">set_rotation_ticks_x</a>(&mut self, rotation: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets the rotation of ticks along the x-axis</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_rotation_ticks_y" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#253-261">Source</a><h4 class="code-header">pub fn <a href="#method.set_rotation_ticks_y" class="fn">set_rotation_ticks_y</a>(&mut self, rotation: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets the rotation of ticks along the y-axis</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_align_labels" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#264-267">Source</a><h4 class="code-header">pub fn <a href="#method.set_align_labels" class="fn">set_align_labels</a>(&mut self) -> &mut Self</h4></section></summary><div class="docblock"><p>Aligns the labels when using subplots</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_title" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#270-273">Source</a><h4 class="code-header">pub fn <a href="#method.set_title" class="fn">set_title</a>(&mut self, title: &<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Adds a title to the plot or sub-plot</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_super_title" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#276-283">Source</a><h4 class="code-header">pub fn <a href="#method.set_super_title" class="fn">set_super_title</a>(
|
||
&mut self,
|
||
title: &<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>,
|
||
params: <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/option/enum.Option.html" title="enum core::option::Option">Option</a><<a class="struct" href="struct.SuperTitleParams.html" title="struct plotpy::SuperTitleParams">SuperTitleParams</a>>,
|
||
) -> &mut Self</h4></section></summary><div class="docblock"><p>Adds a title to all sub-plots</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_horizontal_gap" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#286-289">Source</a><h4 class="code-header">pub fn <a href="#method.set_horizontal_gap" class="fn">set_horizontal_gap</a>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets the horizontal gap between subplots</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_vertical_gap" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#292-295">Source</a><h4 class="code-header">pub fn <a href="#method.set_vertical_gap" class="fn">set_vertical_gap</a>(&mut self, value: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets the vertical gap between subplots</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_gaps" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#298-306">Source</a><h4 class="code-header">pub fn <a href="#method.set_gaps" class="fn">set_gaps</a>(&mut self, horizontal: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>, vertical: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets the horizontal and vertical gap between subplots</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_equal_axes" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#309-316">Source</a><h4 class="code-header">pub fn <a href="#method.set_equal_axes" class="fn">set_equal_axes</a>(&mut self, equal: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets same scale for both axes</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_figure_size_inches" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#319-322">Source</a><h4 class="code-header">pub fn <a href="#method.set_figure_size_inches" class="fn">set_figure_size_inches</a>(&mut self, width: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>, height: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets the figure size in inches</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_figure_size_points" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#326-330">Source</a><h4 class="code-header">pub fn <a href="#method.set_figure_size_points" class="fn">set_figure_size_points</a>(&mut self, width: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>, height: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets the figure size in points</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_hide_axes" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#333-337">Source</a><h4 class="code-header">pub fn <a href="#method.set_hide_axes" class="fn">set_hide_axes</a>(&mut self, hide: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Set option to hide axes</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_range_3d" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#340-351">Source</a><h4 class="code-header">pub fn <a href="#method.set_range_3d" class="fn">set_range_3d</a>(
|
||
&mut self,
|
||
xmin: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>,
|
||
xmax: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>,
|
||
ymin: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>,
|
||
ymax: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>,
|
||
zmin: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>,
|
||
zmax: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>,
|
||
) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets axes limits</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_range" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#354-357">Source</a><h4 class="code-header">pub fn <a href="#method.set_range" class="fn">set_range</a>(
|
||
&mut self,
|
||
xmin: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>,
|
||
xmax: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>,
|
||
ymin: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>,
|
||
ymax: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>,
|
||
) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets axes limits</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_range_from_vec" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#360-368">Source</a><h4 class="code-header">pub fn <a href="#method.set_range_from_vec" class="fn">set_range_from_vec</a>(&mut self, limits: &[<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>]) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets axes limits from vector</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_xmin" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#371-379">Source</a><h4 class="code-header">pub fn <a href="#method.set_xmin" class="fn">set_xmin</a>(&mut self, xmin: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets minimum x</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_xmax" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#382-390">Source</a><h4 class="code-header">pub fn <a href="#method.set_xmax" class="fn">set_xmax</a>(&mut self, xmax: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets maximum x</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_ymin" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#393-401">Source</a><h4 class="code-header">pub fn <a href="#method.set_ymin" class="fn">set_ymin</a>(&mut self, ymin: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets minimum y</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_ymax" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#404-412">Source</a><h4 class="code-header">pub fn <a href="#method.set_ymax" class="fn">set_ymax</a>(&mut self, ymax: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets maximum y</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_xrange" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#415-423">Source</a><h4 class="code-header">pub fn <a href="#method.set_xrange" class="fn">set_xrange</a>(&mut self, xmin: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>, xmax: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets x-range (i.e. limits)</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_yrange" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#426-434">Source</a><h4 class="code-header">pub fn <a href="#method.set_yrange" class="fn">set_yrange</a>(&mut self, ymin: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>, ymax: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets y-range (i.e. limits)</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_num_ticks_x" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#437-449">Source</a><h4 class="code-header">pub fn <a href="#method.set_num_ticks_x" class="fn">set_num_ticks_x</a>(&mut self, num: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.usize.html">usize</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets number of ticks along x</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_num_ticks_y" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#452-464">Source</a><h4 class="code-header">pub fn <a href="#method.set_num_ticks_y" class="fn">set_num_ticks_y</a>(&mut self, num: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.usize.html">usize</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets number of ticks along y</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_ticks_x" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#475-493">Source</a><h4 class="code-header">pub fn <a href="#method.set_ticks_x" class="fn">set_ticks_x</a>(
|
||
&mut self,
|
||
major_every: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>,
|
||
minor_every: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>,
|
||
major_number_format: &<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>,
|
||
) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets the number and format of x-ticks</p>
|
||
<h5 id="input-5"><a class="doc-anchor" href="#input-5">§</a>Input</h5>
|
||
<ul>
|
||
<li><code>major_every</code> – step for major ticks (ignored if ≤ 0.0)</li>
|
||
<li><code>minor_every</code> – step for major ticks (ignored if ≤ 0.0)</li>
|
||
<li><code>major_number_format</code> – C-style number format for major ticks; e.g. “%.2f” (ignored if empty “”)
|
||
See <a href="https://matplotlib.org/stable/api/ticker_api.html#matplotlib.ticker.FormatStrFormatter">matplotlib FormatStrFormatter</a></li>
|
||
</ul>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_ticks_y" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#504-522">Source</a><h4 class="code-header">pub fn <a href="#method.set_ticks_y" class="fn">set_ticks_y</a>(
|
||
&mut self,
|
||
major_every: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>,
|
||
minor_every: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>,
|
||
major_number_format: &<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>,
|
||
) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets the number and format of y-ticks</p>
|
||
<h5 id="input-6"><a class="doc-anchor" href="#input-6">§</a>Input</h5>
|
||
<ul>
|
||
<li><code>major_every</code> – step for major ticks (ignored if ≤ 0.0)</li>
|
||
<li><code>minor_every</code> – step for major ticks (ignored if ≤ 0.0)</li>
|
||
<li><code>major_number_format</code> – C-style number format for major ticks; e.g. “%.2f” (ignored if empty “”)
|
||
See <a href="https://matplotlib.org/stable/api/ticker_api.html#matplotlib.ticker.FormatStrFormatter">matplotlib FormatStrFormatter</a></li>
|
||
</ul>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_ticks_x_multiple_of_pi" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#555-570">Source</a><h4 class="code-header">pub fn <a href="#method.set_ticks_x_multiple_of_pi" class="fn">set_ticks_x_multiple_of_pi</a>(&mut self, minor_every: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets the x-ticks to multiples of pi</p>
|
||
<h5 id="input-7"><a class="doc-anchor" href="#input-7">§</a>Input</h5>
|
||
<ul>
|
||
<li><code>minor_every</code> – step for major ticks (ignored if ≤ 0.0). Example <code>PI / 12.0</code></li>
|
||
</ul>
|
||
<p><strong>Note:</strong> This function sets the major ticks as <code>PI / 2.0</code>.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_ticks_y_multiple_of_pi" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#580-595">Source</a><h4 class="code-header">pub fn <a href="#method.set_ticks_y_multiple_of_pi" class="fn">set_ticks_y_multiple_of_pi</a>(&mut self, minor_every: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets the y-ticks to multiples of pi</p>
|
||
<h5 id="input-8"><a class="doc-anchor" href="#input-8">§</a>Input</h5>
|
||
<ul>
|
||
<li><code>minor_every</code> – step for major ticks (ignored if ≤ 0.0). Example <code>PI / 12.0</code></li>
|
||
</ul>
|
||
<p><strong>Note:</strong> This function sets the major ticks as <code>PI / 2.0</code>.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_log_x" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#602-609">Source</a><h4 class="code-header">pub fn <a href="#method.set_log_x" class="fn">set_log_x</a>(&mut self, log: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets a log10 x-scale</p>
|
||
<h5 id="note-2"><a class="doc-anchor" href="#note-2">§</a>Note</h5>
|
||
<p><code>set_log_x(true)</code> must be called before adding curves.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_log_y" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#616-623">Source</a><h4 class="code-header">pub fn <a href="#method.set_log_y" class="fn">set_log_y</a>(&mut self, log: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets a log10 y-scale</p>
|
||
<h5 id="note-3"><a class="doc-anchor" href="#note-3">§</a>Note</h5>
|
||
<p><code>set_log_y(true)</code> must be called before adding curves.</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_label_x" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#626-629">Source</a><h4 class="code-header">pub fn <a href="#method.set_label_x" class="fn">set_label_x</a>(&mut self, label: &<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets the label for the x-axis</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_label_y" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#632-635">Source</a><h4 class="code-header">pub fn <a href="#method.set_label_y" class="fn">set_label_y</a>(&mut self, label: &<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets the label for the y-axis</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_labels" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#638-646">Source</a><h4 class="code-header">pub fn <a href="#method.set_labels" class="fn">set_labels</a>(&mut self, xlabel: &<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>, ylabel: &<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets the labels of x and y axis</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_inv_x" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#649-652">Source</a><h4 class="code-header">pub fn <a href="#method.set_inv_x" class="fn">set_inv_x</a>(&mut self) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets inverted x-axis</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_inv_y" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#655-658">Source</a><h4 class="code-header">pub fn <a href="#method.set_inv_y" class="fn">set_inv_y</a>(&mut self) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets inverted y-axis</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_camera" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#666-674">Source</a><h4 class="code-header">pub fn <a href="#method.set_camera" class="fn">set_camera</a>(&mut self, elev: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>, azimuth: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.f64.html">f64</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets camera in 3d graph. Sets the elevation and azimuth of the axes.</p>
|
||
<h5 id="input-9"><a class="doc-anchor" href="#input-9">§</a>Input</h5>
|
||
<ul>
|
||
<li><code>elev</code> – is the elevation angle in the z plane</li>
|
||
<li><code>azimuth</code> – is the azimuth angle in the x,y plane</li>
|
||
</ul>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_frame_border" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#677-699">Source</a><h4 class="code-header">pub fn <a href="#method.set_frame_border" class="fn">set_frame_border</a>(
|
||
&mut self,
|
||
left: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a>,
|
||
right: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a>,
|
||
bottom: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a>,
|
||
top: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a>,
|
||
) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets option to hide (or show) frame borders</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.set_frame_borders" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#702-704">Source</a><h4 class="code-header">pub fn <a href="#method.set_frame_borders" class="fn">set_frame_borders</a>(&mut self, show_all: <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.bool.html">bool</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Sets visibility of all frame borders</p>
|
||
</div></details><details class="toggle method-toggle" open><summary><section id="method.extra" class="method"><a class="src rightside" href="../src/plotpy/plot.rs.html#707-710">Source</a><h4 class="code-header">pub fn <a href="#method.extra" class="fn">extra</a>(&mut self, commands: &<a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.str.html">str</a>) -> &mut Self</h4></section></summary><div class="docblock"><p>Writes extra python commands</p>
|
||
</div></details></div></details></div><h2 id="synthetic-implementations" class="section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor">§</a></h2><div id="synthetic-implementations-list"><section id="impl-Freeze-for-Plot" class="impl"><a href="#impl-Freeze-for-Plot" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Freeze.html" title="trait core::marker::Freeze">Freeze</a> for <a class="struct" href="struct.Plot.html" title="struct plotpy::Plot">Plot</a></h3></section><section id="impl-RefUnwindSafe-for-Plot" class="impl"><a href="#impl-RefUnwindSafe-for-Plot" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="struct" href="struct.Plot.html" title="struct plotpy::Plot">Plot</a></h3></section><section id="impl-Send-for-Plot" class="impl"><a href="#impl-Send-for-Plot" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="struct" href="struct.Plot.html" title="struct plotpy::Plot">Plot</a></h3></section><section id="impl-Sync-for-Plot" class="impl"><a href="#impl-Sync-for-Plot" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="struct" href="struct.Plot.html" title="struct plotpy::Plot">Plot</a></h3></section><section id="impl-Unpin-for-Plot" class="impl"><a href="#impl-Unpin-for-Plot" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="struct" href="struct.Plot.html" title="struct plotpy::Plot">Plot</a></h3></section><section id="impl-UnwindSafe-for-Plot" class="impl"><a href="#impl-UnwindSafe-for-Plot" class="anchor">§</a><h3 class="code-header">impl <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="struct" href="struct.Plot.html" title="struct plotpy::Plot">Plot</a></h3></section></div><h2 id="blanket-implementations" class="section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor">§</a></h2><div id="blanket-implementations-list"><details class="toggle implementors-toggle"><summary><section id="impl-Any-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/any.rs.html#138">Source</a><a href="#impl-Any-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T<div class="where">where
|
||
T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.type_id" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/any.rs.html#139">Source</a><a href="#method.type_id" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/any/trait.Any.html#tymethod.type_id" class="fn">type_id</a>(&self) -> <a class="struct" href="https://doc.rust-lang.org/1.84.0/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></section></summary><div class='docblock'>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/1.84.0/core/any/trait.Any.html#tymethod.type_id">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Borrow%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/borrow.rs.html#209">Source</a><a href="#impl-Borrow%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a><T> for T<div class="where">where
|
||
T: ?<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/borrow.rs.html#211">Source</a><a href="#method.borrow" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.Borrow.html#tymethod.borrow" class="fn">borrow</a>(&self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&T</a></h4></section></summary><div class='docblock'>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-BorrowMut%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/borrow.rs.html#217">Source</a><a href="#impl-BorrowMut%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T<div class="where">where
|
||
T: ?<a class="trait" href="https://doc.rust-lang.org/1.84.0/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.borrow_mut" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/borrow.rs.html#218">Source</a><a href="#method.borrow_mut" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fn">borrow_mut</a>(&mut self) -> <a class="primitive" href="https://doc.rust-lang.org/1.84.0/std/primitive.reference.html">&mut T</a></h4></section></summary><div class='docblock'>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/1.84.0/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-From%3CT%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#765">Source</a><a href="#impl-From%3CT%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for T</h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#768">Source</a><a href="#method.from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html#tymethod.from" class="fn">from</a>(t: T) -> T</h4></section></summary><div class="docblock"><p>Returns the argument unchanged.</p>
|
||
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-Into%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#748-750">Source</a><a href="#impl-Into%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><U> for T<div class="where">where
|
||
U: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle method-toggle" open><summary><section id="method.into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#758">Source</a><a href="#method.into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.Into.html#tymethod.into" class="fn">into</a>(self) -> U</h4></section></summary><div class="docblock"><p>Calls <code>U::from(self)</code>.</p>
|
||
<p>That is, this conversion is whatever the implementation of
|
||
<code><a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.From.html" title="trait core::convert::From">From</a><T> for U</code> chooses to do.</p>
|
||
</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryFrom%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#805-807">Source</a><a href="#impl-TryFrom%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U> for T<div class="where">where
|
||
U: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error-1" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#809">Source</a><a href="#associatedtype.Error-1" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html#associatedtype.Error" class="associatedtype">Error</a> = <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_from" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#812">Source</a><a href="#method.try_from" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html#tymethod.try_from" class="fn">try_from</a>(value: U) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><T, <T as <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><U>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details><details class="toggle implementors-toggle"><summary><section id="impl-TryInto%3CU%3E-for-T" class="impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#790-792">Source</a><a href="#impl-TryInto%3CU%3E-for-T" class="anchor">§</a><h3 class="code-header">impl<T, U> <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a><U> for T<div class="where">where
|
||
U: <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>,</div></h3></section></summary><div class="impl-items"><details class="toggle" open><summary><section id="associatedtype.Error" class="associatedtype trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#794">Source</a><a href="#associatedtype.Error" class="anchor">§</a><h4 class="code-header">type <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryInto.html#associatedtype.Error" class="associatedtype">Error</a> = <U as <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a></h4></section></summary><div class='docblock'>The type returned in the event of a conversion error.</div></details><details class="toggle method-toggle" open><summary><section id="method.try_into" class="method trait-impl"><a class="src rightside" href="https://doc.rust-lang.org/1.84.0/src/core/convert/mod.rs.html#797">Source</a><a href="#method.try_into" class="anchor">§</a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryInto.html#tymethod.try_into" class="fn">try_into</a>(self) -> <a class="enum" href="https://doc.rust-lang.org/1.84.0/core/result/enum.Result.html" title="enum core::result::Result">Result</a><U, <U as <a class="trait" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a><T>>::<a class="associatedtype" href="https://doc.rust-lang.org/1.84.0/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>></h4></section></summary><div class='docblock'>Performs the conversion.</div></details></div></details></div></section></div></main></body></html> |