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
signature.asc
Description: Digital signature
------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users