-
Notifications
You must be signed in to change notification settings - Fork 37
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
Orientation & marker size changes on static export of vector graphics. #187
Comments
Update: I do have Kaleido installed but hadn't invoked the export settings. If I add the code
and run it before the |
Thanks for your interest in Kaleido. We are currently working on an overhaul that might address your issue - we hope to have news in a few weeks and will post an update then. Thanks - @gvwilson |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Following the Plotly documentation for static image export:
https://plotly.com/python/static-image-export/
When I try to save the figure using the suggested call to
fig.write_image
, it ignores my rotation and zoom adjustments and saves with some default orientation and a much larger marker size. The documentation says nothing about this, or how to fix it.As an example to reproduce this problem, let's take the 3D Scatter plots documentation example (I'll add a light height to it too):
If i execute this in a Jupyter cell, I can rotate the graph, press the "Download as PNG" button, and get exactly what I see. For example, this image:
But if I then run the recommended export code to save a PDF,
and then view the PDF file, I see something different: the orientation resets and the marker size is huge (screenshot):
Given that the docs don't address this, I'm wondering if it's a bug. Otherwise, there's quite an omission in the documentation.
Either way, my question is how can we export vector images that preserve orientation & marker size? Thanks.
(Workaround: Currently I'm trying to "guess" my camera controls to set them programmatically before the save, but it's a slow iterative process. If there's a way to query
fig.layout.scene.camera.whatever
to then go back to fix the camera for save, please let me know. And add it to the docs! Marker size is the same thing -- I know what markers I see, but have to keep re-saving and checking the size because it's a different size in the PDF. :-( )Version info:
The text was updated successfully, but these errors were encountered: