|
From: Paul I. <piv...@gm...> - 2011-02-01 21:42:30
|
Denzel Li, on 2011-02-01 15:34, wrote:
> I had this problem but could not find the answer online. I will be highly
> appreciating if anyone can point me some direction on this problem.
> I installed pythonxy and used matplotlib through ipython. I used matshow to
> draw a matrix and then set ticklables. This lead to the shown rows having
> uneven height. The following shows my problem:
> ----------------------
> import numpy
> M=randn(4,6)
> matshow(M)
> -----------------------
> This works fine and is shown in fig1.png. However, after I set the yticks:
> ------------------------
> yticks(arange(4), ('1','2','3','4'))
> ---------------------------
> The rows of the matrix drawn have uneven height. Please see fig2.png.
Hi Denzel,
what version of matplotlib are you using? I am unable to
reproduce on fairly recent checkout of svn trunk, so it may be an
issue that was recently fixed.
one workaround would be to set the ylim after the call to yticks,
like this:
plt.ylim(3.5, -0.5)
best,
--
Paul Ivanov
314 address only used for lists, off-list direct email at:
http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7
|