JuliaPlots/Plots.jl

[BUG] legend entry for empty series on pgfplotsx

Open

#2,795 opened on Jun 17, 2020

View on GitHub
 (1 comment) (0 reactions) (0 assignees)Julia (381 forks)batch import
PGFPlotsXbuggood first issuewontfix

Repository metrics

Stars
 (1,943 stars)
PR merge metrics
 (Avg merge 3d 12h) (2 merged PRs in 30d)

Description

Details

plot([],[], label="hello")

can sometimes be useful to add a legend-entry without adding to the plot. It works on other backends, but not on pgfplotsx. Instead, nothing is plotted and no legend entry is added.

Just wanted to report. It's inconsistent but easily circumvented.

Thanks for your work!

Backends

This bug occurs on ( insert x below )

Backend yes no untested
gr (default) x
pyplot
plotly
plotlyjs
pgfplotsx x
inspectdr

Versions

Plots.jl version: 1.4.1 Backend version (]st -m): Output of versioninfo():

Contributor guide