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

Size cannot be adjusted. #19

Closed
elgar328 opened this issue May 28, 2024 · 1 comment
Closed

Size cannot be adjusted. #19

elgar328 opened this issue May 28, 2024 · 1 comment

Comments

@elgar328
Copy link

When I create a figure using PlotlyLight, the HTML version scales well with my settings, but the size of the images saved with PlotlyKaleido does not.

using PlotlyLight
using PlotlyKaleido

p = plot(y=rand(10))

p.layout.autosize = false
p.layout.width = 1000
p.layout.height = 300

PlotlyLight.save(p, "myplot.html")

PlotlyKaleido.start()
(;data, layout, config) = p
PlotlyKaleido.savefig((; data, layout, config), "myplot.png")
PlotlyKaleido.kill_kaleido()

myplot.html
스크린샷 2024-05-29 오전 7 20 21

myplot.png
myplot

@elgar328
Copy link
Author

It works well. It was my mistake.

using PlotlyLight
using PlotlyKaleido

p = plot(y=rand(10))

PlotlyLight.save(p, "myplot.html")

PlotlyKaleido.start()
(;data, layout, config) = p
PlotlyKaleido.savefig((; data, layout, config), "myplot.png", height=300, width=1000)
PlotlyKaleido.kill_kaleido()

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

1 participant