gnuplot_wrapper/commands/plot.rs
1use crate::{command::Command, script::Script};
2
3/// http://gnuplot.info/docs_5.5/loc7740.html
4pub struct Plot {
5 args: String
6}
7
8impl Plot {
9 pub fn new(args: &str) -> Self {
10 return Plot { args: args.to_owned() };
11 }
12}
13
14impl Command for Plot {
15 fn to_raw(&self) -> String {
16 return format!("plot {}", self.args);
17 }
18}
19
20impl Script {
21 pub fn plot(&mut self, plot: &str) {
22 self.add_command(Plot::new(plot));
23 }
24}