Class: Grada::Gnuplot::DataSet
- Inherits:
-
Object
- Object
- Grada::Gnuplot::DataSet
- Defined in:
- lib/grada/types/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.
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 |
# File 'lib/grada/types/gnuplot.rb', line 168 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.
164 165 166 |
# File 'lib/grada/types/gnuplot.rb', line 164 def axes @axes end |
#data ⇒ Object
Returns the value of attribute data.
164 165 166 |
# File 'lib/grada/types/gnuplot.rb', line 164 def data @data end |
#index ⇒ Object
Returns the value of attribute index.
164 165 166 |
# File 'lib/grada/types/gnuplot.rb', line 164 def index @index end |
#linecolor ⇒ Object
Returns the value of attribute linecolor.
164 165 166 |
# File 'lib/grada/types/gnuplot.rb', line 164 def linecolor @linecolor end |
#linestyle ⇒ Object Also known as: ls
Returns the value of attribute linestyle.
164 165 166 |
# File 'lib/grada/types/gnuplot.rb', line 164 def linestyle @linestyle end |
#linewidth ⇒ Object
Returns the value of attribute linewidth.
164 165 166 |
# File 'lib/grada/types/gnuplot.rb', line 164 def linewidth @linewidth end |
#matrix ⇒ Object
Returns the value of attribute matrix.
164 165 166 |
# File 'lib/grada/types/gnuplot.rb', line 164 def matrix @matrix end |
#smooth ⇒ Object
Returns the value of attribute smooth.
164 165 166 |
# File 'lib/grada/types/gnuplot.rb', line 164 def smooth @smooth end |
#title ⇒ Object
Returns the value of attribute title.
164 165 166 |
# File 'lib/grada/types/gnuplot.rb', line 164 def title @title end |
#using ⇒ Object
Returns the value of attribute using.
164 165 166 |
# File 'lib/grada/types/gnuplot.rb', line 164 def using @using end |
#with ⇒ Object
Returns the value of attribute with.
164 165 166 |
# File 'lib/grada/types/gnuplot.rb', line 164 def with @with end |
Instance Method Details
#notitle ⇒ Object
184 185 186 |
# File 'lib/grada/types/gnuplot.rb', line 184 def notitle '"No Title"' end |
#plot_args(io = '') ⇒ Object
188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/grada/types/gnuplot.rb', line 188 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
204 205 206 207 208 |
# File 'lib/grada/types/gnuplot.rb', line 204 def to_gplot return nil if @data.nil? || @data.is_a?(String) @data.to_gplot end |