##// END OF EJS Templates
Merge pull request #2074 from tkf/inlinebg...
Min RK -
r7854:8965c22a merge
parent child Browse files
Show More
@@ -97,15 +97,10 b" def print_figure(fig, fmt='png'):"
97 97
98 98 fc = fig.get_facecolor()
99 99 ec = fig.get_edgecolor()
100 fig.set_facecolor('white')
101 fig.set_edgecolor('white')
102 try:
103 bytes_io = BytesIO()
104 fig.canvas.print_figure(bytes_io, format=fmt, bbox_inches='tight')
105 data = bytes_io.getvalue()
106 finally:
107 fig.set_facecolor(fc)
108 fig.set_edgecolor(ec)
100 bytes_io = BytesIO()
101 fig.canvas.print_figure(bytes_io, format=fmt, bbox_inches='tight',
102 facecolor=fc, edgecolor=ec)
103 data = bytes_io.getvalue()
109 104 return data
110 105
111 106
@@ -40,6 +40,9 b' class InlineBackend(InlineBackendConfig):'
40 40 # so we shrink the figure size to 6x4, and tweak fonts to
41 41 # make that fit.
42 42 rc = Dict({'figure.figsize': (6.0,4.0),
43 # play nicely with white background in the Qt and notebook frontend
44 'figure.facecolor': 'white',
45 'figure.edgecolor': 'white',
43 46 # 12pt labels get cutoff on 6x4 logplots, so use 10pt.
44 47 'font.size': 10,
45 48 # 72 dpi matches SVG/qtconsole
General Comments 0
You need to be logged in to leave comments. Login now