Class: DataSet
- Inherits:
-
Object
- Object
- DataSet
- Defined in:
- lib/grada/gnuplot.rb
Instance Attribute Summary collapse
-
#axes ⇒ Object
Returns the value of attribute axes.
-
#data ⇒ Object
Returns the value of attribute data.
-
#index ⇒ Object
Returns the value of attribute index.
-
#linecolor ⇒ Object
Returns the value of attribute linecolor.
-
#linestyle ⇒ Object
(also: #ls)
Returns the value of attribute linestyle.
-
#linewidth ⇒ Object
Returns the value of attribute linewidth.
-
#matrix ⇒ Object
Returns the value of attribute matrix.
-
#smooth ⇒ Object
Returns the value of attribute smooth.
-
#title ⇒ Object
Returns the value of attribute title.
-
#using ⇒ Object
Returns the value of attribute using.
-
#with ⇒ Object
Returns the value of attribute with.
Instance Method Summary collapse
-
#initialize(data = nil) {|_self| ... } ⇒ DataSet
constructor
A new instance of DataSet.
- #notitle ⇒ Object
- #plot_args(io = '') ⇒ Object
- #to_gplot ⇒ Object
Constructor Details
#initialize(data = nil) {|_self| ... } ⇒ DataSet
Returns a new instance of DataSet.
162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
# File 'lib/grada/gnuplot.rb', line 162 def initialize(data = nil) @data = data @linestyle = nil @title = nil @with = nil @using = nil @linewidth = nil @linecolor = nil @matrix = nil @smooth = nil @axes = nil @index = nil yield self if block_given? end |
Instance Attribute Details
#axes ⇒ Object
Returns the value of attribute axes.
158 159 160 |
# File 'lib/grada/gnuplot.rb', line 158 def axes @axes end |
#data ⇒ Object
Returns the value of attribute data.
158 159 160 |
# File 'lib/grada/gnuplot.rb', line 158 def data @data end |
#index ⇒ Object
Returns the value of attribute index.
158 159 160 |
# File 'lib/grada/gnuplot.rb', line 158 def index @index end |
#linecolor ⇒ Object
Returns the value of attribute linecolor.
158 159 160 |
# File 'lib/grada/gnuplot.rb', line 158 def linecolor @linecolor end |
#linestyle ⇒ Object Also known as: ls
Returns the value of attribute linestyle.
158 159 160 |
# File 'lib/grada/gnuplot.rb', line 158 def linestyle @linestyle end |
#linewidth ⇒ Object
Returns the value of attribute linewidth.
158 159 160 |
# File 'lib/grada/gnuplot.rb', line 158 def linewidth @linewidth end |
#matrix ⇒ Object
Returns the value of attribute matrix.
158 159 160 |
# File 'lib/grada/gnuplot.rb', line 158 def matrix @matrix end |
#smooth ⇒ Object
Returns the value of attribute smooth.
158 159 160 |
# File 'lib/grada/gnuplot.rb', line 158 def smooth @smooth end |
#title ⇒ Object
Returns the value of attribute title.
158 159 160 |
# File 'lib/grada/gnuplot.rb', line 158 def title @title end |
#using ⇒ Object
Returns the value of attribute using.
158 159 160 |
# File 'lib/grada/gnuplot.rb', line 158 def using @using end |
#with ⇒ Object
Returns the value of attribute with.
158 159 160 |
# File 'lib/grada/gnuplot.rb', line 158 def with @with end |
Instance Method Details
#notitle ⇒ Object
178 179 180 |
# File 'lib/grada/gnuplot.rb', line 178 def notitle '"No Title"' end |
#plot_args(io = '') ⇒ Object
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 |
# File 'lib/grada/gnuplot.rb', line 182 def plot_args(io = '') io += @data.is_a?(String) ? @data : "'-'" #io += " index #{@index}" if @index io += " using #{@using}" if @using io += " axes #{@axes}" if @axes io += " title #{@title ? "\"#{@title}\"" : notitle}" io += " matrix #{@matrix}" if @matrix io += " smooth #{@smooth}" if @smooth io += " with #{@with}" if @with io += " linecolor #{@linecolor}" if @linecolor io += " line #{@index} linewidth #{@linewidth}" if @linewidth io += " linestyle #{@linestyle.index}" if @linestyle io end |
#to_gplot ⇒ Object
198 199 200 201 202 |
# File 'lib/grada/gnuplot.rb', line 198 def to_gplot return nil if @data.nil? || @data.is_a?(String) @data.to_gplot end |