[][src]Struct gnuplot::Figure

pub struct Figure { /* fields omitted */ }

A figure that may contain multiple axes

Methods

impl Figure
[src]

pub fn new() -> Figure
[src]

Creates a new figure

pub fn set_terminal<'l>(
    &'l mut self,
    terminal: &str,
    output_file: &str
) -> &'l mut Figure
[src]

Sets the terminal for gnuplot to use, as well as the file to output the figure to. Terminals that spawn a GUI don't need an output file, so pass an empty string for those.

There are a quite a number of terminals, here are some commonly used ones:

  • wxt - Interactive GUI
  • pdfcairo - Saves the figure as a PDF file
  • epscairo - Saves the figure as a EPS file
  • pngcairo - Saves the figure as a PNG file

As of now you can hack the canvas size in by using "pngcairo size 600, 400" for terminal. Be prepared for that kludge to go away, though.

pub fn set_post_commands<'l>(
    &'l mut self,
    post_commands: &str
) -> &'l mut Figure
[src]

Sets commands to send to gnuplot after all the plotting commands.

pub fn set_pre_commands<'l>(&'l mut self, pre_commands: &str) -> &'l mut Figure
[src]

Sets commands to send to gnuplot before any plotting commands.

pub fn axes2d(&mut self) -> &mut Axes2D
[src]

Creates a set of 2D axes

pub fn axes3d(&mut self) -> &mut Axes3D
[src]

Creates a set of 3D axes

pub fn show(&mut self) -> &Figure
[src]

Launch a gnuplot process, if it hasn't been spawned already by a call to this function, and display the figure on it.

pub fn clear_axes(&mut self) -> &Figure
[src]

Clears all axes on this figure.

pub fn echo<'l, T: Writer>(&'l self, writer: &mut T) -> &'l Figure
[src]

Echo the commands that if piped to a gnuplot process would display the figure

Arguments

  • writer - A function pointer that will be called multiple times with the command text and data

pub fn echo_to_file<'l>(&'l self, filename: &str) -> &'l Figure
[src]

Save to a file the the commands that if piped to a gnuplot process would display the figure

Arguments

  • filename - Name of the file

Auto Trait Implementations

impl Send for Figure

impl !Sync for Figure

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

type Error = !

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

🔬 This is a nightly-only experimental API. (try_from)

The type returned in the event of a conversion error.

impl<T> Any for T where
    T: 'static + ?Sized
[src]