Sha256: 18b5581f7ebcb6bd9a1131d4edccb23a0405c35aa8eef43b51cbe51a4a009ddb
Contents?: true
Size: 680 Bytes
Versions: 8
Compression:
Stored size: 680 Bytes
Contents
$:.unshift File.join(File.dirname(__FILE__), *%w[../../lib]) require 'erlectricity' require 'rubygems' require 'gruff' receive do |f| f.when([:plot, String, Symbol, String]) do |name, style, font| graph = Gruff.const_get(style).new graph.title = name graph.font = font graph.legend_font_size = 10 f.receive do |g| g.when([:data, Symbol, Array]) do |name, points| graph.data name, points g.receive_loop end g.when([:labels, Erl.hash]) do |label_data| graph.labels = label_data g.receive_loop end g.when(:end) { :ok } end f.send!([:result, graph.to_blob]) f.receive_loop end end
Version data entries
8 entries across 8 versions & 3 rubygems