JuliaPlots / JuliaPlots/PlotlyJS.jl
Files saved with savefig not display Legend Group Titles
- Dominant language
- Julia
- Stars
- 444
- Forks
- 86
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
When saving a plot which contains legend groups and legend group titles, the legend group title go missing in the output file depending on file type. PNG and PDF have no legend group titles, while the HTML retains those.
While saving a PNG from the html does work and the legend group titles are visible.
Code I used:
`
using PlotlyJS
p = Plot()
add_trace!(p,scatter(x=1:100,y=rand(100),name="1",legendgroup="group",legendgrouptitle_text="First Group"))
add_trace!(p,scatter(x=1:100,y=rand(100),name="1",legendgroup="group"))
add_trace!(p,scatter(x=1:100,y=rand(100),name="1",legendgroup="group2",legendgrouptitle_text="Second Group"))
savefig(p,"test.html")
savefig(p,"test.png")
`
**Version info**
On Windows 10
Please provide the following:
1. output of julia command `versioninfo()`
Julia Version 1.8.2
Commit 36034abf26 (2022-09-29 15:21 UTC)
Platform Info:
OS: Windows (x86_64-w64-mingw32)
CPU: 8 × Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-13.0.1 (ORCJIT, skylake)
Threads: 1 on 8 virtual cores
Environment:
JULIA_EDITOR = code
JULIA_NUM_THREADS =
2. Output running the following in Julia 0.7 or greater: `using Pkg; pkg"status"` (if you are on Julia 0.6 or earlier run `Pkg.status()`)
[336ed68f] CSV v0.10.7
[a93c6f00] DataFrames v1.4.4
[7a1cc6ca] FFTW v1.5.0
[38e38edf] GLM v1.8.1
[7073ff75] IJulia v1.23.3
[23992714] MAT v0.10.3
[f0f68f2c] PlotlyJS v0.18.10
[91a5bcdd] Plots v1.36.6
[92933f4c] ProgressMeter v1.7.2
[5bab7191] SPICE v0.2.3
Directly save to PNG using savefig:

Saved from html:

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.