Class: RubyPost::AbstractPlot

Inherits:
BaseDrawCommand show all
Defined in:
lib/simpleplot.rb

Direct Known Subclasses

CurvedPlot, ImpulsePlot, LinePlot, StemPlot

Instance Attribute Summary collapse

Attributes inherited from BaseDrawCommand

#drawable

Instance Method Summary collapse

Methods inherited from BaseDrawCommand

#add_option, #color, #colour, #compile_options, #rotate, #scale, #set_drawable, #translate

Methods inherited from Object

#compile

Constructor Details

#initialize ⇒ AbstractPlot

Returns a new instance of AbstractPlot.



111
112
113
# File 'lib/simpleplot.rb', line 111

def initialize()
  super()
end

Instance Attribute Details

#x=(value) ⇒ Object (writeonly)

Sets the attribute x

Parameters:

  • value —

    the value to set the attribute x to.



109
110
111
# File 'lib/simpleplot.rb', line 109

def x=(value)
  @x = value
end

#y=(value) ⇒ Object (writeonly)

Sets the attribute y

Parameters:

  • value —

    the value to set the attribute y to.



109
110
111
# File 'lib/simpleplot.rb', line 109

def y=(value)
  @y = value
end

Instance Method Details

#xmax ⇒ Object



115
116
117
# File 'lib/simpleplot.rb', line 115

def xmax
  @x.max
end

#xmin ⇒ Object



119
120
121
# File 'lib/simpleplot.rb', line 119

def xmin
  @x.min
end

#ymax ⇒ Object



123
124
125
# File 'lib/simpleplot.rb', line 123

def ymax
  @y.max
end

#ymin ⇒ Object



127
128
129
# File 'lib/simpleplot.rb', line 127

def ymin
  @y.min
end