Plots.jl: Legends meta-issue

Created on 29 Feb 2020  路  8Comments  路  Source: JuliaPlots/Plots.jl

An overhaul of Plots' legend capabilities would be really useful. Here are some relevant open issues

  • [ ] contour legend does not scale with clims #533
  • [x] Legend position with PlotlyJS #574
  • [ ] shared legend for subplots on some backends #673
  • [ ] Documentation didn't allow me to figure out how to change the names in legends #995
  • [ ] Legend doesn't appear on quiver plot #1589
  • [ ] aspect_ratio = :equal with legend = false not correct for plotlyjs() #1603
  • [x] legendfont does not affect legendtitle #1856
  • [x] markerstrokewidth ignored for legend with PyPlot backend #2033
  • [x] Legend placement with gr appears buggy #2202
  • [ ] Horizontal legends #2206
  • [x] legend = :outerright is missing from the documentation #2207
  • [x] Legend positioned far from borders overlaping data - GR #2330
  • [ ] control the size of colorbars? #2345
  • [ ] Errorbar is missing in the legend #2360
  • [x] legend position with outer legends and vertical subplots #2369
  • [ ] Twinx doesn't combine legends #2417

As well as a desire to share color bars and legends among subplots, allow multiple columns in legends and improvement of the alignment of axes (both with and without link) in layouts with legends.

vizcon

Most helpful comment

Just want to emphasize how useful horizontal legends/legends with multiple columns would be.

All 8 comments

1856 closed

Yay @isentropic you're on a roll!

Perhaps there could be another explicit legend object, that is actually an empty axis with empty plot on it. Similar to what you showed here https://github.com/JuliaPlots/Plots.jl/issues/673 but it would read as,

plot(
scatter(rand(100,3), legend = false),
scatter(rand(100,3), legend = false),
legend((1:3)),  # actually it is scatter((1:3)', xlim = (4,5), legend = true, framestyle = :none) under the hood
layout = @layout([a b c{0.1w}]))

That is we could perhaps add a new series type called legend that would actually be an invisible shrunk axis so that all backends can support it. This way it won't feel look as a hack and can be presented in documentation.
legend would be able to have few recipes supporting only shapes and words given to it

This way we can solve,

2345

673

995

2369

infixing (inplotting) legend series on top of other axes would allow users to have an explicit control over legends if they wish

Just want to emphasize how useful horizontal legends/legends with multiple columns would be.

Fixed #574

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cortner picture cortner  路  4Comments

kersulis picture kersulis  路  5Comments

pkofod picture pkofod  路  3Comments

jebej picture jebej  路  4Comments

Cody-G picture Cody-G  路  3Comments