You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider the following map with discontinuities on the y-axis. The black lines are the contours with value 0. They clearly are wrong at the discontinuity on the y-axis. Expected would be a horizontal line at y=0. Is this a general drawback of the algorithm are is this an edge case, which is not dealt with yet?
xs = range(-6, 6, length=200)
ys = range(-6, 6, length=200)
zs = [angle((x+im*y)^2) for x in xs, y in ys]
heatmap(xs, ys, zs'; cmap=:autumn1)
cl = Contour.contour(xs,ys,zs, 0.)
xs, ys = coordinates(lines(cl)[1])
plot!(xs, ys; color=:black,lw=5)
The first contour:
The second contour looks like this:
The text was updated successfully, but these errors were encountered:
The algorithm doesn't know about the nature of the function you're trying to contour. It sees values changing sign across the y-axis, and without knowing that it's actually a discontinuity it assumes that the function must be zero along the y-axis. I think this will be the case with any contouring algorithm that just takes in a matrix of numbers.
Maybe we can put in an option where the algorithm will treat value jumps larger than some input parameter as a discontinuity? I'd rather handle cases like this by filtering out the contours lines afterwards, but it's not difficult to add this extra parameter in if there's enough people needing this.
Consider the following map with discontinuities on the y-axis. The black lines are the contours with value 0. They clearly are wrong at the discontinuity on the y-axis. Expected would be a horizontal line at y=0. Is this a general drawback of the algorithm are is this an edge case, which is not dealt with yet?
The first contour:
The second contour looks like this:
The text was updated successfully, but these errors were encountered: