diff --git a/lib/gnuplot.rb b/lib/gnuplot.rb index aa1028a..0ee51d4 100644 --- a/lib/gnuplot.rb +++ b/lib/gnuplot.rb @@ -175,17 +175,20 @@ def store_datasets (io = "") end end + # Analogous to Plot class, holds command information and performs the formatting of that command + # information to a Gnuplot process. Should be used when for drawing 3D plots. + class SPlot < Plot def initialize (io = nil, cmd = "splot") super end + # Currently using the implementation from parent class Plot. + # Leaving the method explicit here, though, as to allow an specific + # implementation for SPlot in the future. def to_gplot (io = "") - @settings.each do |setting| - io << setting.map(&:to_s).join(" ") << "\n" - end - io + super end end