JonyEpsilon / gorilla-repl

A rich REPL for Clojure in the notebook style.
http://gorilla-repl.org
MIT License
887 stars 104 forks source link

Difficulty plotting Infinity and NaN #110

Open paul-english opened 10 years ago

paul-english commented 10 years ago

This may be a Vega issue, if so I'll move it, but there are definite issues plotting extreme values.

Consider this function & plot,

(defn g [x] (Math/log (inc x)))
(plot g [-5 5])
JonyEpsilon commented 10 years ago

Oh, yes, that's not very good! I'm not really sure what the solution is, as I think the underlying problem is that JSON has no way of representing NaN or Infinity. At the moment Cheshire is converting them to strings in the JSON it outputs, which seems sensible, but it doesn't look as though Vega is handling them well.

I guess the options are: