title: Saving Altair charts without white space around them
body: <p>I'm using Altair charts in my academic papers.</p>
  <p>Conference papers have strict page limits. Naturally, I want to use all of the space I decide to assign for a figure for the actual chart and not for the white space around it. White space is automatically added around figures by the Latex typesetting framework, and authors are warned against tampering with it, so I don't need additional white space inside of my images.</p>
  <p>Currently, my method is that every time I generate a chart I want to paste into my paper, I first manually remove the white space around the png image using KolourPaint. This is tedious and error-prone, of course.</p>
  <p>Is there a way to configure Altair to generate only the minimum amount of white space around a chart? If it matters, vertical white borders matter more for me.</p>
  <p>Altair chart saved as png:
  <a href="https://i.stack.imgur.com/OT5tu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OT5tu.png" alt="enter image description here" /></a></p>
  <p>Image after manual removal of white space around the chart:
  <a href="https://i.stack.imgur.com/Zu6lE.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Zu6lE.png" alt="enter image description here" /></a></p>
  <p>(you might need to download the two images and open them in an image viewer to see the white border more clearly)</p>