Class: YouPlot::Command::PlotParams

Inherits:
Struct
  • Object
show all
Defined in:
lib/youplot/command/plot_params.rb

Overview

UnicodePlot parameters.

  • Normally in a Ruby program, you might use hash for the parameter object.

  • Here, I use Struct for 2 safety reason.

  • The keys are static in Struct.

  • Struct does not conflict with keyword arguments. Hash dose.

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#borderObject

Returns the value of attribute border



10
11
12
# File 'lib/youplot/command/plot_params.rb', line 10

def border
  @border
end

#canvasObject

Returns the value of attribute canvas



10
11
12
# File 'lib/youplot/command/plot_params.rb', line 10

def canvas
  @canvas
end

#closedObject

Returns the value of attribute closed



10
11
12
# File 'lib/youplot/command/plot_params.rb', line 10

def closed
  @closed
end

#colorObject

Returns the value of attribute color



10
11
12
# File 'lib/youplot/command/plot_params.rb', line 10

def color
  @color
end

#gridObject

Returns the value of attribute grid



10
11
12
# File 'lib/youplot/command/plot_params.rb', line 10

def grid
  @grid
end

#heightObject

Returns the value of attribute height



10
11
12
# File 'lib/youplot/command/plot_params.rb', line 10

def height
  @height
end

#labelsObject

Returns the value of attribute labels



10
11
12
# File 'lib/youplot/command/plot_params.rb', line 10

def labels
  @labels
end

#marginObject

Returns the value of attribute margin



10
11
12
# File 'lib/youplot/command/plot_params.rb', line 10

def margin
  @margin
end

#nameObject

Returns the value of attribute name



10
11
12
# File 'lib/youplot/command/plot_params.rb', line 10

def name
  @name
end

#nbinsObject

Returns the value of attribute nbins



10
11
12
# File 'lib/youplot/command/plot_params.rb', line 10

def nbins
  @nbins
end

#paddingObject

Returns the value of attribute padding



10
11
12
# File 'lib/youplot/command/plot_params.rb', line 10

def padding
  @padding
end

#symbolObject

Returns the value of attribute symbol



10
11
12
# File 'lib/youplot/command/plot_params.rb', line 10

def symbol
  @symbol
end

#titleObject

Returns the value of attribute title



10
11
12
# File 'lib/youplot/command/plot_params.rb', line 10

def title
  @title
end

#widthObject

Returns the value of attribute width



10
11
12
# File 'lib/youplot/command/plot_params.rb', line 10

def width
  @width
end

#xlabelObject

Returns the value of attribute xlabel



10
11
12
# File 'lib/youplot/command/plot_params.rb', line 10

def xlabel
  @xlabel
end

#xlimObject

Returns the value of attribute xlim



10
11
12
# File 'lib/youplot/command/plot_params.rb', line 10

def xlim
  @xlim
end

#xscaleObject

Returns the value of attribute xscale



10
11
12
# File 'lib/youplot/command/plot_params.rb', line 10

def xscale
  @xscale
end

#ylabelObject

Returns the value of attribute ylabel



10
11
12
# File 'lib/youplot/command/plot_params.rb', line 10

def ylabel
  @ylabel
end

#ylimObject

Returns the value of attribute ylim



10
11
12
# File 'lib/youplot/command/plot_params.rb', line 10

def ylim
  @ylim
end

Instance Method Details

#to_hcObject



32
33
34
# File 'lib/youplot/command/plot_params.rb', line 32

def to_hc
  to_h.compact
end