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

Files saved with savefig not display Legend Group Titles #456

Open
Straehlc opened this issue Dec 15, 2022 · 2 comments
Open

Files saved with savefig not display Legend Group Titles #456

Straehlc opened this issue Dec 15, 2022 · 2 comments

Comments

@Straehlc
Copy link

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 =

  1. 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:
failed
Saved from html:
from_html

@pawbz
Copy link

pawbz commented Jan 3, 2023

It would be nice if this could be resolved. Facing the same issue. The legendgrouptitle_text is replaced with Aa before saving as e.g., PDF.

@qdddddd
Copy link

qdddddd commented Mar 9, 2023

Same issue here saving as SVG.

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