domitry / nyaplot

interactive plots generator for Ruby
MIT License
219 stars 27 forks source link

legend_options do not appear to work #64

Open sskates1 opened 8 years ago

sskates1 commented 8 years ago
array_of_values = [5..10]
plot1 = Nyaplot::Plot.new
b_plots = {}
array_of_values.each_with_index do |values, index|
  b = [0..5].map{|i| i*value}
  b_plots[values] = plot1.add(:line, truncate, b)
  b_plots[values].title("V = #{values}")
end

plot1.x_label("Test #")
plot1.y_label("number of occurrences")
plot1.legend(true)
plot1.bg_color("#FFF")
plot1.legend_options({title: 'test title', font_size: 34.0 })
plot1.export_html('info.html')

legend_options appears to be set correctly but it does not change what is displayed. No title or change in font size.