Hello,
I have been fighting with this problem for some time. It seems that
if, on a plot, I have some text inside a bounding box, it displays
fine on the screen, saves OK as a PNG, but when I save the plot as a
PDF the padding on the right side between the text and the box
disappears. I have attached a minimal example with a text box, but
this problem occurs for legends as well, if the legend text is
long-ish. I am also attaching a PNG and a PDF output, as well as how
the PDF shows up on my viewer. Has anyone else experienced this?
Other relevant info:
**$ uname -a**
Linux Merlin 3.2.0-77-generic #114-Ubuntu SMP Tue Mar 10 17:26:03
UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
**$ python -c 'import matplotlib; print matplotlib.__version__'**
1.3.1
**Where I obtained matplotlib:**
The matplotlib SourceForge site
**Customisations to** **matplotlibrc:**
backend : Qt4Agg
lines.markersize : 10 # markersize, in points
font.sans-serif : Ubuntu, Calibri, Liberation Sans
font.monospace : Consolas, Inconsolata, Ubuntu Mono, Droid
Sans Mono
axes.color_cycle : e41a1c, 377eb8, 4daf4a, 984ea3, ff7f00, ffff33,
a65628, f781bf, 999999
pdf.fonttype : 42 # Output Type 3 (Type3) or Type 42
(TrueType) # I have tried with fonttype=3 as well, and the bug still
exists
**$ python bug_test.py --verbose-helpful > output.txt**
output.txt attached
Thanks,
Sourish
bug_test.pdf (173 KB)
textbox_padding_pdf.py (463 Bytes)
output.txt (811 Bytes)