We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 50928d9 + 128b505 commit 9892758Copy full SHA for 9892758
lib/matplotlib/tight_bbox.py
@@ -88,15 +88,19 @@ def adjust_bbox_pdf(fig, bbox_inches):
88
adjust_bbox for pdf & eps format
89
"""
90
91
- tr = Affine2D().scale(72)
+ if fig._cachedRenderer.__class__.__name__ == "RendererPgf":
92
+ tr = Affine2D().scale(fig.dpi)
93
+ f = 1.
94
+ else:
95
+ tr = Affine2D().scale(72)
96
+ f = 72. / fig.dpi
97
98
_bbox = TransformedBbox(bbox_inches, tr)
99
100
fig.bbox_inches = Bbox.from_bounds(0, 0,
101
bbox_inches.width,
102
bbox_inches.height)
103
x0, y0 = _bbox.x0, _bbox.y0
- f = 72. / fig.dpi
104
w1, h1 = fig.bbox.width*f, fig.bbox.height*f
105
fig.transFigure._boxout = Bbox.from_bounds(-x0, -y0,
106
w1, h1)
0 commit comments