-
-
Notifications
You must be signed in to change notification settings - Fork 359
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
primary attribute not taking effect in nested series #1495
Comments
I believe |
Thank you @joshday , I think this one is a real issue. I used to make use of the using Plots
x = linspace(0,1,10)
scatter(x)
plot!(x, primary=false) The color is preserved with built-in plot commands. The issue is in defining nested series in plot recipes. If there is any other way to circumvent this, I'd be happy to learn. |
You're right @juliohm . I think this was possibly introduced by #1011 , but it's certainly an unwelcome side effect. Could you use this workaround? @recipe function f(foo::FooPlot)
y = foo.args[1]
x = 1:length(y)
@series begin
seriestype --> :scatter
x, 2y
end
@series begin
seriestype := :path
primary := false
x, y
end
[],[]
end |
Thank you @mkborregaard, that is a very nice solution. |
@mkborregaard the solution works nicely, except that the legend is affected. Even though the second series copies the color and style, the legend shows a different series (for the [], [] pair?) in the final plot. |
Yes it seems to do that in some backends but not others. Just adding |
Still, it sounds like this should be solved. For instance, seriestype= :scatterpath now gives different colors for the dots and the lines, which was not the intent. |
maybe just a question of fixing the scatterpath recipe? |
Yeah, maybe. At least, it would help to show exactly what to do to go around this issue. In the
meantime, could this issue be reopened?
…On Fri, Sep 18, 2020 at 10:19 PM Michael Krabbe Borregaard < ***@***.***> wrote:
maybe just a question of fixing the scatterpath recipe?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#1495 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABPPPXPPNLW477PXMM5YSFLSGQ5PZANCNFSM4E4CXXZQ>
.
|
correct scatterpath so that color does not change (see JuliaPlots#1495). Add linearfit.
Can be closed now #3423 |
Could you please confirm that the following should produce two series with the same color?
I remember using it in the past, but I am not sure.
The text was updated successfully, but these errors were encountered: