John, thanks for the swift reply.

1) Yes. I later found that whenever I call imshow with extent option more
than once, the coordinates will be off.

2) Here is a sample script

-----------------------------------------
from pylab import *

img = imread("image.png")
imshow(img)
axis("off")
savefig("image.pdf")
-----------------------------------------

Just try any png off the web and generate pdf using 0.91 and 0.98. Look
closely at the results. There are two major differences. One is that the
pixel is larger in 0.98 than in 0.91; also the color looks lossy in 0.98. I
suspect that there is more compression for pdf in 0.98, but I am not clear
how to reset it.


On Thu, Sep 25, 2008 at 9:37 AM, John Hunter <[EMAIL PROTECTED]> wrote:

> On Wed, Sep 24, 2008 at 2:16 PM, Haibao Tang <[EMAIL PROTECTED]> wrote:
>
> > for k in cm_keys:
> >     imshow(Y, extent=(xstart, xstart+.7*col_interval,
> >                       ystart, ystart+.5*row_interval),
> > cmap=get_cmap(name=k))
> >     root.text(xstart+.75*col_interval, ystart, k, size=9)
> >     xstart += col_interval
> >     if j%2==0:
> >        xstart = .03
> >        ystart -= row_interval
> >     j += 1
> >
> > root.set_xlim(0, 1)
> > root.set_ylim(0, 1)
> > root.set_axis_off()
> > savefig("cm_instances.pdf")
>
> > Different versions gave me different results, with only the old version
> > appears to be correct.
>
> When I run your script with 91.5 (svn branch) vs 98.3 (svn head), I
> see that the text labels do not align with the  images (PDF only, not
> Agg)  in 98.3 and not 91.5.  Is this the problem you are describing?
>
> It appears that the image positioning argument is off in the PDF
> backend because comparing the trunk vs the head, the labels are in the
> same relative position and the images are off.  Could one of the PDF
> backend gurus look into this?
>
> > In addition, when I wish to imshow a JPG image through PIL, the newer
> > version gave me very low resolution. Can someone duplicate my
> observation? I
> > appreciate any solution, thanks.
>
> I am not sure what you are trying here -- can you post a script that
> illustrates the problem?
>
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to