Class: GnuPlot
- Inherits:
-
Object
- Object
- GnuPlot
- Defined in:
- lib/gnuplotty/GnuPlot-Class.rb
Constant Summary collapse
- @@commandstring =
''
Class Method Summary collapse
Instance Method Summary collapse
- #add ⇒ Object
-
#initialize(command, options = '') ⇒ GnuPlot
constructor
A new instance of GnuPlot.
Constructor Details
#initialize(command, options = '') ⇒ GnuPlot
Returns a new instance of GnuPlot.
10 11 12 13 |
# File 'lib/gnuplotty/GnuPlot-Class.rb', line 10 def initialize(command,='') @command=command = end |
Class Method Details
.commandstring ⇒ Object
25 26 27 |
# File 'lib/gnuplotty/GnuPlot-Class.rb', line 25 def self.commandstring @@commandstring end |
.show ⇒ Object
21 22 23 |
# File 'lib/gnuplotty/GnuPlot-Class.rb', line 21 def self.show `gnuplot -persist -e \"#{@@commandstring}\"` end |
Instance Method Details
#add ⇒ Object
15 16 17 18 19 |
# File 'lib/gnuplotty/GnuPlot-Class.rb', line 15 def add c=@command+' '+ @@commandstring=@@commandstring+"; " unless @@commandstring=='' @@commandstring=@@commandstring+c end |