Class: YouPlot::Parameters

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

Overview

UnicodePlot parameters. Why Struct, not Hash?

  • 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

Returns:

  • (Object)

    the current value of border



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def border
  @border
end

#canvasObject

Returns the value of attribute canvas

Returns:

  • (Object)

    the current value of canvas



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def canvas
  @canvas
end

#closedObject

Returns the value of attribute closed

Returns:

  • (Object)

    the current value of closed



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def closed
  @closed
end

#colorObject

Returns the value of attribute color

Returns:

  • (Object)

    the current value of color



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def color
  @color
end

#gridObject

Returns the value of attribute grid

Returns:

  • (Object)

    the current value of grid



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def grid
  @grid
end

#heightObject

Returns the value of attribute height

Returns:

  • (Object)

    the current value of height



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def height
  @height
end

#labelsObject

Returns the value of attribute labels

Returns:

  • (Object)

    the current value of labels



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def labels
  @labels
end

#marginObject

Returns the value of attribute margin

Returns:

  • (Object)

    the current value of margin



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def margin
  @margin
end

#nameObject

Returns the value of attribute name

Returns:

  • (Object)

    the current value of name



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def name
  @name
end

#nbinsObject

Returns the value of attribute nbins

Returns:

  • (Object)

    the current value of nbins



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def nbins
  @nbins
end

#paddingObject

Returns the value of attribute padding

Returns:

  • (Object)

    the current value of padding



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def padding
  @padding
end

#symbolObject

Returns the value of attribute symbol

Returns:

  • (Object)

    the current value of symbol



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def symbol
  @symbol
end

#titleObject

Returns the value of attribute title

Returns:

  • (Object)

    the current value of title



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def title
  @title
end

#widthObject

Returns the value of attribute width

Returns:

  • (Object)

    the current value of width



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def width
  @width
end

#xlabelObject

Returns the value of attribute xlabel

Returns:

  • (Object)

    the current value of xlabel



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def xlabel
  @xlabel
end

#xlimObject

Returns the value of attribute xlim

Returns:

  • (Object)

    the current value of xlim



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def xlim
  @xlim
end

#xscaleObject

Returns the value of attribute xscale

Returns:

  • (Object)

    the current value of xscale



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def xscale
  @xscale
end

#ylabelObject

Returns the value of attribute ylabel

Returns:

  • (Object)

    the current value of ylabel



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def ylabel
  @ylabel
end

#ylimObject

Returns the value of attribute ylim

Returns:

  • (Object)

    the current value of ylim



8
9
10
# File 'lib/youplot/parameters.rb', line 8

def ylim
  @ylim
end

Instance Method Details

#to_hcObject



30
31
32
# File 'lib/youplot/parameters.rb', line 30

def to_hc
  to_h.compact
end