From: Stefan v. d. W. <st...@su...> - 2006-06-15 22:20:24
|
On Thu, Jun 15, 2006 at 11:02:47AM -0600, Fernando Perez wrote: > On 6/15/06, Stefan van der Walt <st...@su...> wrote: > > I often want to plot matrices, with the axes labeled according to the > > matrix index. I.e. the top-lefthand element should be (0,0) and the > > bottom-righthand element (rows,columns). Setting the extent does > > work, i.e. > > > > ax.imshow(im,extent=3D(1,columns,rows,1)) > > > > If others also use this frequently, it may be useful to have a quick > > way of doing it (or maybe, there already is, and I've missed it). >=20 > See matshow(), by yours truly :) One of my few direct contributions > to mpl. There may be a better way to do what it does with today's > mpl, but it works for me (all the figures from the SANUM talk were > done with it). That's exactly what I need -- except that it forces the creation of a new figure, which doesn't play well with subplot. Specifying a figure number is, like it says in the docstring, rather unpredictable. Is there an easy way to work around that limitation? An example plot of what I would like to see is at http://mentat.za.net/results/lp.jpg Cheers St=E9fan |