gnuplot_wrapper/commands/
clear.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use crate::{command::Command, script::Script};

/// http://gnuplot.info/docs_5.5/loc6622.html
pub struct Clear {}

impl Clear {
    pub fn new() -> Self {
        return Clear {};
    }
}

impl Command for Clear {
    fn to_raw(&self) -> String {
        return "clear".to_string();
    }
}

impl Script {
    pub fn clear(&mut self) {
        self.add_command(Clear::new());
    }
}