xlabel, ylabel position

No. I posted several times about this issue but

    > unfortunately nobody seems to have this problem and/or a
    > solution. If you're also running Debian sagre stable then I
    > guess one of the (many) libs that mpl is using is too
    > old/buggy in stable.

Interesting also that both of you appear to have german as your
default language. I wonder if one of the default fonts you are using
is different and is providing bad font metrics. Could you run a
script in the environment which produces the error with
--verbose-debug, and then again in the environment which doesn't with
the same flag and post the output of both cases. Maybe something
about first installing 0.82 and then removing it makes a difference in
which fonts are found. Just guessing. But verbose-debug will at
least identify which font files are being loaded.

If you could do the same Willi, we might be able to triangulate on the
common cause for this problem.

JDH

John Hunter wrote:

"Steve" == Steve Schmerler <elcorto@...361...> writes:

    > No. I posted several times about this issue but
    > unfortunately nobody seems to have this problem and/or a
    > solution. If you're also running Debian sagre stable then I
    > guess one of the (many) libs that mpl is using is too
    > old/buggy in stable.

Interesting also that both of you appear to have german as your
default language. I wonder if one of the default fonts you are using
is different and is providing bad font metrics. Could you run a
script in the environment which produces the error with
--verbose-debug, and then again in the environment which doesn't with
the same flag and post the output of both cases. Maybe something
about first installing 0.82 and then removing it makes a difference in
which fonts are found. Just guessing. But verbose-debug will at
least identify which font files are being loaded.

here the test script:

···

----------------------------------------------
plot([1,2,3])
xlabel('x-label')
ylabel('y-label')
show()
----------------------------------------------

attached files:

mpl_svn0.87.2_bad_labels.txt
mpl_deb0.82_good_labels.txt
mpl_svn0.87.2_good_labels_run_1.txt
mpl_svn0.87.2_good_labels_run_2.txt
uninstall.sh

what I did:

1)
* no mpl stuff on the machine, removed .matplotlibrc/.tex.cache and
   .matplotlibrc/.ttffont.cache
* installed latest svn (0.87.2)
* the 1st run creates .matplotlib/.tex.cache and
   ./matplotlib/.ttffont.cache
* the --verbose-debug output of a normal run is in
   mpl_svn0.87.2_bad_labels.txt
* the x-axis starts at -1, not at 0, labels have the wrong position

2)
* uninstalled 0.87.2 with uninstall.sh
* istalled 0.82 debs
* labels OK, --verbose-debug output in mpl_deb0.82_good_labels.txt

3)
* removed 0.87.2 build folder, *not* $HOME/.tex.cache,
   $HOME/.ttffont.cache (which is 0.82 stuff)
* recompiled and installed 0.87.2
* labels OK
* the output of the 1st run where .matplotlibrc/.tex.cache and
   .matplotlibrc/.ttffont.cache are created is in
    mpl_svn0.87.2_good_labels_run_1.txt (copy-paste from shell)
* the normal-run output is in mpl_svn0.87.2_good_labels_run_2.txt

Now the outputs mpl_svn0.87.2_bad_labels.txt and mpl_svn0.87.2_good_labels_run_2.txt should show some difference regarding loaded font libs but they don't ....

----------------------------------------------------------------------
elcorto@...662...:~$ diff -cbB mpl_svn0.87.2_bad_labels.txt mpl_svn0.87.2_good_labels_run_2.txt
*** mpl_svn0.87.2_bad_labels.txt 2006-03-17 20:39:53.000000000 +0100
--- mpl_svn0.87.2_good_labels_run_2.txt 2006-03-17 21:10:11.000000000 +0100
***************
*** 1,3 ****
--- 1,6 ----
+ elcorto@...662...:~$ python test.py --verbose-debug
+ /usr/lib/python2.3/site-packages/pylab.py:1: DeprecationWarning: Non-ASCII character '\xc3' in file /usr/lib/python2.3/site-packages/matplotlib/__init__.py on line 148, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details
+ from matplotlib.pylab import *
   matplotlib data path /usr/lib/python2.3/site-packages/matplotlib/mpl-data
   $HOME=/home/elcorto
   CONFIGDIR=/home/elcorto/.matplotlib
----------------------------------------------------------------------

(The DeprecationWarning is caused because of the line

__date__ = '$Date: 2006-03-17 20:21:28 +0100 (Fr, 17 M�r 2006) $'

where obviously the german date (output of date?) causes some little trouble)

cheers,
steve

--
Random number generation is the art of producing pure gibberish as quickly as possible.

John Hunter wrote:

"Steve" == Steve Schmerler <elcorto@...361...> writes:

    > No. I posted several times about this issue but
    > unfortunately nobody seems to have this problem and/or a
    > solution. If you're also running Debian sagre stable then I
    > guess one of the (many) libs that mpl is using is too
    > old/buggy in stable.

Interesting also that both of you appear to have german as your
default language. I wonder if one of the default fonts you are using
is different and is providing bad font metrics. Could you run a
script in the environment which produces the error with
--verbose-debug, and then again in the environment which doesn't with
the same flag and post the output of both cases. Maybe something
about first installing 0.82 and then removing it makes a difference in
which fonts are found. Just guessing. But verbose-debug will at
least identify which font files are being loaded.

sorry forgot to attach the files :slight_smile:

here the test script:

mpl_deb0.82_good_labels.txt (1.78 KB)

mpl_svn0.87.2_bad_labels.txt (2.39 KB)

mpl_svn0.87.2_good_labels_run_1.txt (7.43 KB)

mpl_svn0.87.2_good_labels_run_2.txt (2.76 KB)

uninstall.sh (504 Bytes)

···

----------------------------------------------
plot([1,2,3])
xlabel('x-label')
ylabel('y-label')
show()
----------------------------------------------

attached files:

mpl_svn0.87.2_bad_labels.txt
mpl_deb0.82_good_labels.txt
mpl_svn0.87.2_good_labels_run_1.txt
mpl_svn0.87.2_good_labels_run_2.txt
uninstall.sh

what I did:

1)
* no mpl stuff on the machine, removed .matplotlibrc/.tex.cache and
   .matplotlibrc/.ttffont.cache
* installed latest svn (0.87.2)
* the 1st run creates .matplotlib/.tex.cache and
   ./matplotlib/.ttffont.cache
* the --verbose-debug output of a normal run is in
   mpl_svn0.87.2_bad_labels.txt
* the x-axis starts at -1, not at 0, labels have the wrong position

2)
* uninstalled 0.87.2 with uninstall.sh
* istalled 0.82 debs
* labels OK, --verbose-debug output in mpl_deb0.82_good_labels.txt

3)
* removed 0.87.2 build folder, *not* $HOME/.tex.cache,
   $HOME/.ttffont.cache (which is 0.82 stuff)
* recompiled and installed 0.87.2
* labels OK
* the output of the 1st run where .matplotlibrc/.tex.cache and
   .matplotlibrc/.ttffont.cache are created is in
    mpl_svn0.87.2_good_labels_run_1.txt (copy-paste from shell)
* the normal-run output is in mpl_svn0.87.2_good_labels_run_2.txt

Now the outputs mpl_svn0.87.2_bad_labels.txt and
mpl_svn0.87.2_good_labels_run_2.txt should show some difference
regarding loaded font libs but they don't ....

----------------------------------------------------------------------
elcorto@...662...:~$ diff -cbB mpl_svn0.87.2_bad_labels.txt
mpl_svn0.87.2_good_labels_run_2.txt
*** mpl_svn0.87.2_bad_labels.txt 2006-03-17 20:39:53.000000000 +0100
--- mpl_svn0.87.2_good_labels_run_2.txt 2006-03-17 21:10:11.000000000 +0100
***************
*** 1,3 ****
--- 1,6 ----
+ elcorto@...662...:~$ python test.py --verbose-debug
+ /usr/lib/python2.3/site-packages/pylab.py:1: DeprecationWarning:
Non-ASCII character '\xc3' in file
/usr/lib/python2.3/site-packages/matplotlib/__init__.py on line 148, but
no encoding declared; see http://www.python.org/peps/pep-0263.html for
details
+ from matplotlib.pylab import *
   matplotlib data path /usr/lib/python2.3/site-packages/matplotlib/mpl-data
   $HOME=/home/elcorto
   CONFIGDIR=/home/elcorto/.matplotlib
----------------------------------------------------------------------

(The DeprecationWarning is caused because of the line

__date__ = '$Date: 2006-03-17 20:21:28 +0100 (Fr, 17 M�r 2006) $'

where obviously the german date (output of date?) causes some little
trouble)

cheers,
steve

--
Random number generation is the art of producing pure gibberish as
quickly as possible.

John Hunter wrote:

Interesting also that both of you appear to have german as your
default language. I wonder if one of the default fonts you are using
is different and is providing bad font metrics.

Hi

Finally I found some time to check this one. I changed my system language from german into english and the problem went away. Although I wonder which files mpl loads are different since a run with --verbose=debug says

font search path ['/usr/lib/python2.3/site-packages/matplotlib/mpl-data']
trying fontname /usr/lib/python2.3/site-packages/matplotlib/mpl-data/VeraSe.ttf
trying fontname /usr/lib/python2.3/site-packages/matplotlib/mpl-data/VeraMono.ttf
trying fontname /usr/lib/python2.3/site-packages/matplotlib/mpl-data/cmr10.ttf
trying fontname /usr/lib/python2.3/site-packages/matplotlib/mpl-data/cmtt10.ttf
trying fontname /usr/lib/python2.3/site-packages/matplotlib/mpl-data/cmmi10.ttf
trying fontname /usr/lib/python2.3/site-packages/matplotlib/mpl-data/VeraMoBd.ttf
trying fontname /usr/lib/python2.3/site-packages/matplotlib/mpl-data/VeraBI.ttf
trying fontname /usr/lib/python2.3/site-packages/matplotlib/mpl-data/Vera.ttf
loaded ttfcache file /home/elcorto/.matplotlib/ttffont.cache
backend GTKAgg version 2.6.1
     findfont failed Lucida Grande
     findfont failed Verdana
     findfont failed Geneva
     findfont failed Lucida
     findfont found Bitstream Vera Sans, normal, normal 500, normal, 12.0
findfont returning /usr/lib/python2.3/site-packages/matplotlib/mpl-data/Vera.ttf

So does mpl use system fonts as well as it's own?

cheers,
steve

ps:
Some time ago I posted a _mathtext_data.py which turns slanted
uppercase greek letters into non-slanted ones. It works nicely here on my system. Has anyone of the developers had a look at it?

···

--
Random number generation is the art of producing pure gibberish as quickly as possible.