Skip to content

Plotting Float::NAN values. #27

Description

@boris-s

It happens that the current version of ruby_gnuplot plots NaN data values as equal to the labels, as in

Gnuplot.open do |gp|
  Gnuplot::Plot.new gp do |plot|
    ary =  [ [0, 1, 2, 3], [ Float::NAN ] * 4 ]
    plot.data << Gnuplot::DataSet.new( ary ) { |set| set.with = "linespoints" }
  end
end

This is misleading. It caused me a long debugging session. The gem should warn and not display the NaN values in the chart at all. There should be a special setting on how to handle Float::NAN and Float::INFINITY values, and only when the user sets this setting explicitly should the warning go away. Btw. congrats to writing a great gem.

boris

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions