From 10ee9f2ffd37b71ed2d4a2f1f8d09d7c899b4828 Mon Sep 17 00:00:00 2001 From: llrt Date: Wed, 12 Dec 2012 10:16:14 -0200 Subject: [PATCH] Make SPlot.to_gplot use parent's implementation --- lib/gnuplot.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/gnuplot.rb b/lib/gnuplot.rb index a66b18e..0ee51d4 100644 --- a/lib/gnuplot.rb +++ b/lib/gnuplot.rb @@ -175,16 +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 = "") - @sets.each { |var, val| io << "set #{var} #{val}\n" } - - io + super end end