Open jkochNU opened 2 years ago
@jkochNU heads up that the pre-commit bot push a commit with styling changes. You can either git pull
or on your next push do git push -f
to override that commit (but then it will happen again to auto style things). I'd also recommend installing it locally with pre-commit install
That said I don't think that the correct solution is to limit ourselves to pdfs here. Instead we could have the button mean "Save according to rcparams" and a second button (probably with a different icon) that would do the current behavior of downloading.
@ianhi
Before I make changes in that direction: in my mind, a more flexible solution should do the following: upon clicking the new button, open a native file dialog box. There, the export file type could default to the one in rcParams
, but the file type dropdown should allow for a variety of choices supported by savefig
. I've looked into this a bit more, and it is less clear to me now that this is as simple as I was hoping for.
Regarding your suggested solution: we should keep in mind that rcParams
already defaults to png format. So unless the user makes an explicit change, displaying a separate button saving to the rcParams
format will typically just result in yet another button saving to png. We could make the presence of the additional button depend on whether the rcParams
format differs from png. The button would remain missing, though, if the rcParams
format was changed midway...
As discussed with @ianhi, this is an attempt to (partially) address #138. This would add an additional button to the toolbar associated with a
figure.canvas
. Once clicked, a pdf is generated withsavefig
and then handed over to the frontend inside a new tab.