Skip to content
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

Legend for barplot #120

Closed
jtrakk opened this issue Nov 16, 2020 · 2 comments
Closed

Legend for barplot #120

jtrakk opened this issue Nov 16, 2020 · 2 comments

Comments

@jtrakk
Copy link

jtrakk commented Nov 16, 2020

This doesn't generate a legend but it could.

(
        data(DataFrame(value=randn(2000), group=rand(["a", "b"], 2000))) 
        * mapping(:value, color=:group => categorical)
        * AlgebraOfGraphics.histogram
) |> draw


Warning: Automated legend was not possible due to ErrorException("    There is no `legendelements` method defined for plot type Combined{AbstractPlotting.barplot,Tuple{Array{Point{2,Float32},1}}}. This means\n    that you can't automatically generate a legend entry for this plot type.\n    You can overload this method for your plot type that returns a `LegendElement`\n    vector, or manually construct a legend entry from those elements.\n")
@greimel
Copy link
Collaborator

greimel commented Dec 28, 2020

Seems to be solved by JuliaPlots/AbstractPlotting.jl#565.

image

@piever
Copy link
Collaborator

piever commented Mar 13, 2021

Yes, this has been fixed upstream in AbstractPlotting.

@piever piever closed this as completed Mar 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants