-
Notifications
You must be signed in to change notification settings - Fork 250
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
Weird stacking of layers #1391
Comments
I can reproduce this by inserting a NaN into the matrix X: x = 0.001:0.01:10
n = length(x)
y = advdiff.(x) # a custom function to generate y
X = hcat(50y+randn(n), 50y+0.4*randn(n), 50y+0.3*randn(n))
X[500,1] = NaN
ci = Col.index(1:3...)
plot(X, x=repeat(x, inner=3), y=Col.value(1:3...), color=ci, Geom.line,
Scale.color_discrete) A workaround would be to remove the row with NaN (or missing). |
I opened an issue in Compose (GiovineItalia/Compose.jl#384), which is a first step towards fixing the above issue. The issue here is that in Gadfly, |
@Mattriks You nailed it. I really had NaN's in the dataset. I was suspecting that they cause this behavior but i was not sure!!! Thank you very much!!! My short term solution was to plot all the gray lines first because they did not have NaNs and plot the red line (with NaN's) last. |
The code is complicated so I cannot give you a simple breaking example. However, in essence, I plot a series of gray curves and a single red curve. However, when the curves are plotted the red curve is sometimes behind and sometimes in front of the gray layers. How is this possible?!
the code is something like this:
What I can potentially do to avoid this from hqppening?!
The text was updated successfully, but these errors were encountered: