gnuplot_wrapper/commands/plot.rs
use crate::{command::Command, script::Script};
/// http://gnuplot.info/docs_5.5/loc7740.html
pub struct Plot {
args: String
}
impl Plot {
pub fn new(args: &str) -> Self {
return Plot { args: args.to_owned() };
}
}
impl Command for Plot {
fn to_raw(&self) -> String {
return format!("plot {}", self.args);
}
}
impl Script {
pub fn plot(&mut self, plot: &str) {
self.add_command(Plot::new(plot));
}
}