-
-
Notifications
You must be signed in to change notification settings - Fork 354
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
shared legend for subplots on some backends #673
Comments
I think the placement of legends in combined plots is sub-optimal right now. Using |
I second Nosferican's suggestion for a |
yes it would be nice to have for sure |
In the absence of that, any suggestions for how I would get it using pyplot() backend? |
You can also pass an (x,y) Tuple for fine-grained control. |
true, but I can't (easily) get the legend outside of a subplot right? So for example I've got a 6 by 2 layout and would ideally have the legend sitting centred above the top row of plots. |
Colorbar or legend? There are some hacks - with colorbar you can set the a,b,c,d = ntuple(x->randn(10000), 4)
p1 = histogram2d(a,b, colorbar = false)
p2 = histogram2d(c,d, clims = zlims(p1))
plot(p1, p2, layout = @layout([a{0.46w} b])) With legend you can always use an invisible subplot and hack it a bit: plot(
scatter(rand(100,3), legend = false),
scatter(rand(100,3), legend = false),
scatter((1:3)', xlim = (4,5), legend = true, framestyle = :none),
layout = @layout([a b c{0.1w}])) |
But actually, improvements to the general legend capability are much in demand |
I'm encountering this legend issue with my multi-panel plot (some of the subplots are heatmaps) using Plotly as my backend. A coherent solution to this problem allowing for separate legends for each subplot is very appreciated. |
This is a longstanding issue with plotly, and it is really due to plotlys inability to have multiple legends. |
I would also like to have the option to display just one legend for all subplots on GR backend. I would like to use a separate keyword |
On some backends (
plotly
,plotlyjs
), the following code combines the legends into a single one, while on some backends the (gr
,pyplot
) the legends are separate for each subplot (as they should be). Cf discussion on Discourse. Same with master and release versions (at the time of opening the issue).The text was updated successfully, but these errors were encountered: