-
Notifications
You must be signed in to change notification settings - Fork 32
Open
Description
There is inconsistent behaviour when plotting NaN values vs Inf values:
require 'gnuplot'
a=torch.rand(5)
a[2] = 0/0
a[4] = 1/0
gnuplot.plot(a)
gnuplot.axis({0,5,0,2})
This produces the following:
The item at a[4] (Inf) is not drawn. That's great. However, the item at a[2] (NaN) is drawn - but at x=1. When plotting any NaN value a[i]=NaN, this will be plotted as (x,y) = (i-1,i), which is weird.
Of course this is not a major problem - let's concentrate on fixing the code that's producing NaN! - but it is an oddity to be aware of I think. Perhaps this is well known behaviour in gnuplot, though.
Metadata
Metadata
Assignees
Labels
No labels
