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
For SVG and PNG exports, different matplotlib FigureCanvas classes are used (FigureCanvasSVG for svgs and FigureCanvasAgg if not), but you can pass whatever you need with the canvas_cls= argument to plot.save(), in addition to extra kwargs for the matplotlib's .print_figure() method.
Maybe the defaults are different... or maybe it's a transparency thing? (the frameon attribute of the Figure is set as False, so in PNGs the outside space is transparent.
If you need to set a colored background for the PNG export, you can do this:
# this ensures a figure is createdax=chart.plot()
# this enables the frame for the backgroundax.get_figure().set_frameon(True)
# save with custom facecolorchart.save("test1-chart.png", facecolor="#FFFF00")
If that's not the problem, could you provide more detailed info to try to reproduce your issue?
chart.save("test1-chart.svg") has axis, some white space outside of chart.
chart.save("test1-chart.png") has no axis, png ends at boundaries of chart.
The text was updated successfully, but these errors were encountered: