Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plotting Float::NAN values. #27

Open
boris-s opened this issue Feb 16, 2014 · 0 comments
Open

Plotting Float::NAN values. #27

boris-s opened this issue Feb 16, 2014 · 0 comments

Comments

@boris-s
Copy link

boris-s commented Feb 16, 2014

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant