I want to export a plot that contains no "unnecessary" patches. The following code exports a figure that has invisible patches with zero alpha:

```
plt.title("Test")
plt.plot()
plt.gca().patch.set_alpha(0.)
plt.gcf().patch.set_alpha(0.)
plt.savefig('test.svg')

```

Although these patches are not visible, their geometry hinders Inkscape from properly resizing the page to its content. Would these "unnecessary" patches be removed the grey area could be cropped using e.g. Inkscape:

[![enter image description here](https://i.stack.imgur.com/Tez7B.png)](https://i.stack.imgur.com/Tez7B.png)

How do I either plot without the patches or remove the figure's and axis' patches programmatically?