You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
savefig.transparent has no effect when saving from UI #9080
On Wed, Aug 23, 2017 at 1:00 PM, Antony Lee ***@***.***> wrote:
Bug report
*Bug summary*
The savefig.transparent rcparam does not affect figures saved from the GUI.
*Code for reproduction*
from pylab import *
rcParams["savefig.transparent"] = True
plot()
show()
then click on the save button to save a figure.
*Actual outcome*
The figure has opaque background.
*Expected outcome*
The figure should have transparent background, just as it has when calling
savefig().
*Matplotlib version*
- Operating System:
- Matplotlib Version: 2.0.2 but apparently dates back to at least
1.5.0.
- Python Version:
- Jupyter Version (if applicable):
- Other Libraries:
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#9080>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AARy-ISLV9NujWvsYiqZ0-qMo-8rT905ks5sbFqxgaJpZM4PATli>
.
I suspect this has been here much longer and is related to the some what convoluted method that print_figure is finally called either going through the 'save' button or savefig. I have a vague memory of trying to trace through all of that a few years ago and giving up.
quickfix: use savefig everywhere instead of print_figure,
later: move everything from savefig to print_figure, so that savefig is a completely empty wrapper for print_figure (we could also have moved everything from print_figure to savefig and have print_figure be a minimal dispatcher to the print_* methods, but that would cause a backcompatibility break as print_figure would lose some capabilities).
Activity
WeatherGod commentedon Aug 23, 2017
anntzer commentedon Aug 23, 2017
I think this is different: I am specifically talking about a difference in behavior between interactive save and savefig.
tacaswell commentedon Aug 24, 2017
I suspect this has been here much longer and is related to the some what convoluted method that
print_figureis finally called either going through the 'save' button orsavefig. I have a vague memory of trying to trace through all of that a few years ago and giving up.u55 commentedon Aug 25, 2017
There was a related pull request here: #6197 for
savefig.facecolorandsavefig.edgecolor. It should be simple to addsavefig.transparent.anntzer commentedon Aug 25, 2017
Looks like the following chunk from Figure.savefig
should be moved to print_figure (which savefig ultimately calls, so there's no need to keep it in both places).
tacaswell commentedon Aug 27, 2017
Sounds reasonable.
The restore code would also have to move.
anntzer commentedon Aug 29, 2017
I think the correct strategy is
anntzer commentedon Sep 1, 2017
Closed by #9124.