Class: Digiproc::Rbplot

Inherits:
Object
  • Object
show all
Defined in:
lib/rbplot.rb

Overview

Plotting API built on top of Gruff meant to have similar characterstics to matplotlib

Defined Under Namespace

Classes: LinePlot

Constant Summary collapse

MIDNIGHT =
{
  :colors => [
    '#00dae5',  #teal
    '#FF1A1A',  # red
    '#3FFC07',  # green
    '#FDD84E',  # yellow
    '#6886B4',  # blue
    '#8A6EAF',  # purple
    '#EFAA43',  # orange
    'white'
  ],
  :marker_color => '#7e7c7f',
  :font_color => '#cccccc',
  :background_colors => %w(black #2a2a2a)
}
SUBMARINE =
{
  :colors => [
    '#FF1A1A',  # red
    '#3FFC07',  # green
    '#FDD84E',  # yellow
    '#6886B4',  # blue
    '#8A6EAF',  # purple
    '#EFAA43',  # orange
    'white'
  ],
  :marker_color => '#3d007a',
  :font_color => '#cccccc',
  :background_colors => %w(black #2a2a2a)
}
BLUESCALE =
{
  :colors => [
    '#0b0b70', #Blue
    '#981598', #Purple
    '#181000', #Dark gray
    '#B50202', #
    '#c8c8c8', #
    '#e8e8e8', #
  ],
  :marker_color => '#aea9a9', # Grey
  :font_color => 'black',
  :background_colors => 'white'
}

Class Method Summary collapse

Class Method Details

.line(x = nil, y = nil, label = "data") ⇒ Object

Constuctor for a line plot instnace x = Digiproc::Functions.linspace(1,100,100) y = Digiproc::Probability.nrand(100) plt = Digiproc::Rbplot.line(x, y, “random vals”)



56
57
58
# File 'lib/rbplot.rb', line 56

def self.line(x = nil, y = nil, label="data")
    LinePlot.new(x, y, label)
end