From: Rob Redmon Date: 2009-08-29T20:47:32+09:00 Subject: gnuplot line color How do I choose the color used to make a gnuplot? I'm doing something like: def plot( output ) require 'gnuplot' Gnuplot.open do |gp| Gnuplot::Plot.new( gp ) do |plot| if ( output ) plot.terminal "png small" plot.output "#{output}" plot.pointsize 1 end # plot.xrange "[#{@obs_times[0].to_s.gsub("T"," ")} to #{@obs_times[0].to_s.gsub("T"," ")}]" # plot.xrange "[\"2009-01-01T00:00:00+00:00\":\"2009-01-01T23:59:00+00:00\"]" plot.title "#{@header["element"].gsub("'","p")}" plot.ylabel "#{@header["element"].gsub("'","p")} [#{@header["units"]}]" plot.xlabel "time: #{@obs_times.first} - #{@obs_times.last}" # plot.data << Gnuplot::DataSet.new( [ @obs_times, @data ] ) do |ds| plot.data << Gnuplot::DataSet.new( [ @data ] ) do |ds| ds.with = "lines" ds.linewidth = 2 ds.notitle end plot.data << Gnuplot::DataSet.new( [ @data ] ) do |ds| ds.with = "points" ds.notitle end plot.grid end end end Presently this produces a plot that has green points on top of red line: http://ngdc.noaa.gov/stp/IONO/ionosonde/MIDS/catalog/trends/BC840/BC840_fmin.png I'd like to explicitly specify the colors and produce a black line with blue points. How do I do that? -- Posted via http://www.ruby-forum.com/.