If I understood the method correctly, tight_bbox causes a figure to be printed to a in-memory buffer first, determines the bounding box of the figure contents and saves a new figure shrunk to the extent of the contents. Right?
Tight_bbox seems to have trouble figuring out the bounding box of a PDF created with latex using the pgf backend. This example produces a PNG and a PDF to be clipped with tight_bbox (make sure you are using the current master). The PNG is clipped correctly, the bounding box of the PDF is estimated incorrectly however.
import matplotlib as mpl
import matplotlib.pyplot as plt
plt.plot(range(5), markersize=2, marker='x')
I don't know exactly how tight_bbox works, or why it doesn't just calculate the figure's extent in the same way tight_layout solves that issue instead.
I'm marking this with the 1.2 milestone, because it would be nice to have this resolved for the release when many people are likely to try the new awesome PGF backend. We can let this slide if the solution turns out to be tricky.
Hm.. what is the kwarg bbox_inches_restore supposed to do? It is given to me at the second pass of print_pdf.. I'm getting some bounding box and a function..
I think I found the reason for this. Let's continue here:
Workaround for matplotlib 1.2 release
I'm closing this because I understand #1155 resolves it (at least insofar as a temporary solution for 1.2.x). Please reopen if I'm mistaken.