Method: Nyaplot::Colors.div

Defined in:
lib/nyaplot/color.rb

.div(num) ⇒ Nyaplot::Color

Returns A colorset randomly selected from diverging ones.

Returns:

  • (Nyaplot::Color)

    A colorset randomly selected from diverging ones



41
42
43
44
# File 'lib/nyaplot/color.rb', line 41

define_method(:div) {|num=nil|
  seq = color_set.select{|name, colors| colors["type"] == "div"}
  self.send(seq.keys.sample, num)
}