Discussion:
[Matplotlib-users] Possible bug in padding between text and bounding box for PDF
Sourish Basu
2015-04-08 16:08:48 UTC
Permalink
$HOME=/home/i
matplotlib data path /usr/local/lib/python2.7/dist-packages/matplotlib-1.3.1-py2.7-linux-x86_64.egg/matplotlib/mpl-data
loaded rc file /home/i/.config/matplotlib/matplotlibrc
matplotlib version 1.3.1
verbose.level helpful
interactive is False
platform is linux2
CACHEDIR=/home/i/.cache/matplotlib
Using fontManager instance from /home/i/.cache/matplotlib/fontList.cache
backend Qt4Agg version 4.9.1
findfont: Matching :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=medium to Ubuntu (/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-R.ttf) with score of 0.000000
findfont: Matching :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=20.0 to Ubuntu (/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-R.ttf) with score of 0.000000
Thomas Caswell
2015-05-07 15:19:50 UTC
Permalink
Sourish,

We no longer are updating the 1.3.x releases. Can you reproduce this
problem using 1.4.3?

Tom
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?
*$ 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
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Sourish Basu
2015-05-07 19:18:58 UTC
Permalink
$HOME=/home/i
matplotlib data path /usr/local/lib/python2.7/dist-packages/matplotlib-1.4.3-py2.7-linux-x86_64.egg/matplotlib/mpl-data

*****************************************************************
You have the following UNSUPPORTED LaTeX preamble customizations:

Please do not ask for support with these customizations active.
*****************************************************************

loaded rc file /home/i/.config/matplotlib/matplotlibrc
matplotlib version 1.4.3
verbose.level helpful
interactive is False
platform is linux2
CACHEDIR=/home/i/.cache/matplotlib
font search path [u'/usr/local/lib/python2.7/dist-packages/matplotlib-1.4.3-py2.7-linux-x86_64.egg/matplotlib/mpl-data/fonts/ttf', u'/usr/local/lib/python2.7/dist-packages/matplotlib-1.4.3-py2.7-linux-x86_64.egg/matplotlib/mpl-data/fonts/afm', u'/usr/local/lib/python2.7/dist-packages/matplotlib-1.4.3-py2.7-linux-x86_64.egg/matplotlib/mpl-data/fonts/pdfcorefonts']
Using fontManager instance from /home/i/.cache/matplotlib/fontList.cache
backend Qt4Agg version 4.9.1
findfont: Matching :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=medium to Ubuntu ('/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-R.ttf') with score of 0.000000
findfont: Matching :family=sans-serif:style=normal:variant=normal:weight=normal:stretch=normal:size=20.0 to Ubuntu ('/usr/share/fonts/truetype/ubuntu-font-family/Ubuntu-R.ttf') with score of 0.000000
Loading...