-
Notifications
You must be signed in to change notification settings - Fork 62
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
ENH Download plots as PDF in the html (for now only SVG) #777
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #777 +/- ##
=======================================
Coverage 82.27% 82.27%
=======================================
Files 46 46
Lines 3171 3171
=======================================
Hits 2609 2609
Misses 562 562 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you show a screen shot of the interface ?
|
||
Plotly.downloadImage(plot, | ||
{format: 'svg', | ||
// filename is the name of the solver used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably not the solver?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is it a svg? it shoud be a pdf :) or change the name of the feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is an svg because I couldn't convert it yet to pdf like I said in my first comment. It is still a work in progress.
Trying to add the functionality described in issue #767
Added a PDF button in the html to download the plot in pdf. For now it is only possible to download the plot as an SVG.
I added the
exportPDF
function that utilizes Plotly directly by calling thedownloadImage
method.Next step would be to convert the svg to pdf directly in the
exportPDF
. An attempt has been unsuccesful usingjsPDF
.