-
-
Notifications
You must be signed in to change notification settings - Fork 78
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
Options provided to plot(..., options=Dict) arent recognized when calling savefig #366
Comments
Plotlyjs.jl,
It saves the plot with the config settings (I checked it). PlotlyJS.jl
But
lists:
I think that saving a plot with config settings is not implemented in PlotlyJS.jl. @sglyon can confirm this? |
A closely related problem, so I didn't open a new issue for it: the size keyword argument is also not recognised when calling savefig. Minimal example:
The resulting SVG file has width="700" and height="500" instead of 1600 and 900. This occurs in Julia v1.6.2, with Plots v1.21.3 and PlotlyJS v0.18.7. |
@jvkerckh Just run these lines, and see the difference:
|
Thanks @empet good help! There is a pretty recent function called
|
I am not sure, if I use it correctly. Here my snippet:
The strange thing is, both html-files have the identical size. |
They are identical because you did not set width and height. For the first version it saves the file with the default settlngs (width=600, height=450, for example, has no effect).
|
Thanks for your reply! Sorry, I mean the file-size in kB. |
via PyCall I can generate an offline ready HTML:
|
Hi! The options specified in
P = plot(rand(10, 4), options=Dict(:staticPlot => true))
aren't recognized when I callsavefig(P, "out.html")
and view the resulting HTML file in my browser, as the plot isn't static. (This is the minimal example given inPlotlyJS.jl/docs/src/syncplots.md
.)Here's a more full example taken from #326:
When I view
out.html
in my browser, the "download image" button still gives a PNG with the default dimensions, not an SVG. The options I specified are not present in theout.html
source. The problem occurs for me on Julia 1.5.3 with PlotlyJS.jl v0.14.0 or the master HEAD.Thanks for any help you can provide!
The text was updated successfully, but these errors were encountered: