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