[Matplotlib-users] Fwd: Empty squares at end of data after interpolation with griddata?

2009-07-05 Thread Rick Muller
Meant to copy this to the list as well for completeness.

-- Forwarded message --
From: Rick Muller rpmul...@gmail.com
Date: Sun, Jul 5, 2009 at 2:03 PM
Subject: Re: [Matplotlib-users] Empty squares at end of data after
interpolation with griddata?
To: Jeff Whitaker jsw...@fastmail.fm


The link should work now. What you say about extrapolation makes perfect
sense. I wonder why those points aren't being computed. In any case, thanks
for the help!

Rick

On Sun, Jul 5, 2009 at 7:27 AM, Jeff Whitaker jsw...@fastmail.fm wrote:


 http://files.getdropbox.com/u/533499/griddata-example-text.png



 Rick:  That URL doesn't work.

 griddata won't do extrapolation, that is it won't interpolate outside the
 convex hull of the data.  That's probably why you see those empty squares at
 the edges.

 --
Rick Muller
rpmul...@gmail.com



-- 
Rick Muller
rpmul...@gmail.com
--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] contourf: black lines connecting contour levels?

2009-07-04 Thread Rick Muller
Beautiful! The SVN version worked well for this.

I forgot to check whether the workaround for version 0.98.5.3 worked; you
may be right, and I may have simply forgotten to redraw the figure, but I
think I did so (I normally kill my windows between plotting).

Thanks very much for your help with this!

On Fri, Jul 3, 2009 at 1:52 PM, Jae-Joon Lee lee.j.j...@gmail.com wrote:

 The example in the cookbool works fine with svn version of mpl.
 So, it seems that this bug has been fixed.

 Anyhow, which command (contour or contourf) draws the vertical lines?
 I bet it is contourf. And set_edgecolor(none) for return value of
 contourf should have some effect. Did you redraw the figure?
 Regards,

 -JJ


 On Thu, Jul 2, 2009 at 9:20 PM, Rick Mullerrpmul...@gmail.com wrote:
  Oh, and I'm using the Agg backend, I think, whatever is the default.
 
  On Thu, Jul 2, 2009 at 7:19 PM, Rick Muller rpmul...@gmail.com wrote:
 
  JJ
 
  Thanks for the tips. I had seen one of those posts whilst googling
 around
  for the bug, but discounted it because I'm not using an alpha value.
 
  Here are links to one of the cookbook examples, and one of the files
 that
  I want to plot:
  http://files.getdropbox.com/u/533499/griddata-test.png
  http://files.getdropbox.com/u/533499/silicon_donor_10_newplot.png
 
  I'm using Mac OS 10.5.7, Python 2.6.2, and MPL 0.98.5.3.
 
  I don't know which bug in the thread you were referring to. I tried the
 
   for c in CS.collections: c.set_edgecolor(none)
 
  fix, but it didn't have any effect.
 
  On Thu, Jul 2, 2009 at 4:49 PM, Jae-Joon Lee lee.j.j...@gmail.com
 wrote:
 
  The dropbox link is broken (you need a public url).
  What version of mpl and what backend are you using?
 
  There was a similar problem which has now been fixed.
  Try the work-around described in the thread below, and see if works.
 
  http://www.nabble.com/problems-with-contourf---alpha-td22553269.html
 
 
  Regards,
 
  -JJ
 
 
 
  On Thu, Jul 2, 2009 at 4:26 PM, Rick Mullerrpmul...@gmail.com wrote:
   When I do contourf plots in matplotlib, I get lines connecting the
   contour
   levels. This doesn't only appear to be an artifact of my plotting
   algorithms, it appears in this example from the matplotlib cookbook:
  
  
  
 http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data
  
   at least on my mac.
  
   (I think this is the link to the output I get from that:
  
 https://dl-web.getdropbox.com/get/Photos/griddata-test.png?w=007c9af9
   )
  
   Is there a way to keep these lines from happening? If not, is there a
   way to
   turn off all of the black lines separating the contour levels?
  
   Thanks in advance,
  
   Rick
  
   --
   Rick Muller
   rpmul...@gmail.com
  
  
  
 --
  
   ___
   Matplotlib-users mailing list
   Matplotlib-users@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/matplotlib-users
  
  
 
 
 
  --
  Rick Muller
  rpmul...@gmail.com
 
 
 
  --
  Rick Muller
  rpmul...@gmail.com
 




-- 
Rick Muller
rpmul...@gmail.com
--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Empty squares at end of data after interpolation with griddata?

2009-07-04 Thread Rick Muller
Having one last problem with matplotlib. I have some data that I'm
interpolating with griddata, and then plotting with contourf. For reasons
that escape me, the upper right and the lower left squares are not being
plotted. I'm printing out a 10x10 version of this to exaggerate the effect:

http://files.getdropbox.com/u/533499/griddata-example-text.png

In reality, I interpolate/plot this 200x200 squares, and none of it is all
that noticeable. However, I'm worried that I'm doing something wrong here,
and that the mistake is going to come back and bite me later on. Has anyone
seen anything like this?

Thanks for any help you can offer with this, and thank for all of the help
the list members have already given me.

Rick
-- 
Rick Muller
rpmul...@gmail.com
--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] contourf: black lines connecting contour levels?

2009-07-02 Thread Rick Muller
JJ

Thanks for the tips. I had seen one of those posts whilst googling around
for the bug, but discounted it because I'm not using an alpha value.

Here are links to one of the cookbook examples, and one of the files that I
want to plot:
http://files.getdropbox.com/u/533499/griddata-test.png
http://files.getdropbox.com/u/533499/silicon_donor_10_newplot.png

I'm using Mac OS 10.5.7, Python 2.6.2, and MPL 0.98.5.3.

I don't know which bug in the thread you were referring to. I tried the

 for c in CS.collections: c.set_edgecolor(none)

fix, but it didn't have any effect.

On Thu, Jul 2, 2009 at 4:49 PM, Jae-Joon Lee lee.j.j...@gmail.com wrote:

 The dropbox link is broken (you need a public url).
 What version of mpl and what backend are you using?

 There was a similar problem which has now been fixed.
 Try the work-around described in the thread below, and see if works.

 http://www.nabble.com/problems-with-contourf---alpha-td22553269.html


 Regards,

 -JJ



 On Thu, Jul 2, 2009 at 4:26 PM, Rick Mullerrpmul...@gmail.com wrote:
  When I do contourf plots in matplotlib, I get lines connecting the
 contour
  levels. This doesn't only appear to be an artifact of my plotting
  algorithms, it appears in this example from the matplotlib cookbook:
 
 
 http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data
 
  at least on my mac.
 
  (I think this is the link to the output I get from that:
  https://dl-web.getdropbox.com/get/Photos/griddata-test.png?w=007c9af9
  )
 
  Is there a way to keep these lines from happening? If not, is there a way
 to
  turn off all of the black lines separating the contour levels?
 
  Thanks in advance,
 
  Rick
 
  --
  Rick Muller
  rpmul...@gmail.com
 
 
 --
 
  ___
  Matplotlib-users mailing list
  Matplotlib-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/matplotlib-users
 
 




-- 
Rick Muller
rpmul...@gmail.com
--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] contourf: black lines connecting contour levels?

2009-07-02 Thread Rick Muller
Oh, and I'm using the Agg backend, I think, whatever is the default.

On Thu, Jul 2, 2009 at 7:19 PM, Rick Muller rpmul...@gmail.com wrote:

 JJ

 Thanks for the tips. I had seen one of those posts whilst googling around
 for the bug, but discounted it because I'm not using an alpha value.

 Here are links to one of the cookbook examples, and one of the files that I
 want to plot:
 http://files.getdropbox.com/u/533499/griddata-test.png
 http://files.getdropbox.com/u/533499/silicon_donor_10_newplot.png

 I'm using Mac OS 10.5.7, Python 2.6.2, and MPL 0.98.5.3.

 I don't know which bug in the thread you were referring to. I tried the

  for c in CS.collections: c.set_edgecolor(none)

 fix, but it didn't have any effect.


 On Thu, Jul 2, 2009 at 4:49 PM, Jae-Joon Lee lee.j.j...@gmail.com wrote:

 The dropbox link is broken (you need a public url).
 What version of mpl and what backend are you using?

 There was a similar problem which has now been fixed.
 Try the work-around described in the thread below, and see if works.

 http://www.nabble.com/problems-with-contourf---alpha-td22553269.html


 Regards,

 -JJ



 On Thu, Jul 2, 2009 at 4:26 PM, Rick Mullerrpmul...@gmail.com wrote:
  When I do contourf plots in matplotlib, I get lines connecting the
 contour
  levels. This doesn't only appear to be an artifact of my plotting
  algorithms, it appears in this example from the matplotlib cookbook:
 
 
 http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data
 
  at least on my mac.
 
  (I think this is the link to the output I get from that:
  https://dl-web.getdropbox.com/get/Photos/griddata-test.png?w=007c9af9
  )
 
  Is there a way to keep these lines from happening? If not, is there a
 way to
  turn off all of the black lines separating the contour levels?
 
  Thanks in advance,
 
  Rick
 
  --
  Rick Muller
  rpmul...@gmail.com
 
 
 --
 
  ___
  Matplotlib-users mailing list
  Matplotlib-users@lists.sourceforge.net
  https://lists.sourceforge.net/lists/listinfo/matplotlib-users
 
 




 --
 Rick Muller
 rpmul...@gmail.com




-- 
Rick Muller
rpmul...@gmail.com
--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Help building

2009-06-30 Thread Rick Muller
I've been a long time, happy user of MPL, but I'm having some problems
building the latest version (0.98.5.3) on the Mac (python 2.6.2).

The bottom line is that when I build, I get the error message:

ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libPng.dylib, file is
not o
f required architecture for architecture ppc
collect2: ld returned 1 exit status
lipo: can't open input file:
/var/folders/tu/tuLdYMqlEm00c5EVXrMQ+U+++TQ/-Tmp-//
cci4zDq4.out (No such file or directory)
error: command 'g++' failed with exit status 1

However, I have a freshly-built version of libpng installed from source in
/usr/local/lib. I don't think MPL is finding it, though, since during config
I see:

libpng: found, but unknown version (no pkg-config)

(However, when I install libpng, I do install the pc file, viz:
cd /usr/local/lib/pkgconfig; rm -f libpng.pc
cd /usr/local/lib/pkgconfig; ln -s libpng12.pc libpng.pc)

I'm probably doing something dumb. Is there a workaround to this?

Thanks in advance,

Rick

-- 
Rick Muller
rpmul...@gmail.com
--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Help building

2009-06-30 Thread Rick Muller
On Tue, Jun 30, 2009 at 9:14 AM, Michael Droettboom md...@stsci.edu wrote:

 What does

  pkg-config libpng --modversion --libs --cflags

 give?


I guess I don't have pkg-config installed. Is this a requirement? I haven't
had it installed before?




 The pkg-config error may actually be a red herring, since matplotlib will
 look in /usr/local even if pkg-config fails, and it obviously found the
 headers or it wouldn't have gotten to the linking stage.  As the author of
 the pkg-config support I would like to rule that out as the problem though.

 I think it's more likely that the libpng isn't being built correctly to
 match the kind of binary matplotlib is building.  I'm afraid that's where I
 hit the end of my knowledge as a non-Mac user, but I'm sure another Mac
 developer will chime in.


I think it's just finding the wrong version of libpng. For whatever reason,
it has decided that an old version in
/Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libPng.dylib is the proper
version, despite there being a newer version in /usr/local/lib.

Is there any way I can rearrange the search path so that it finds the
/usr/local/lib version?

Rick
-- 
Rick Muller
rpmul...@gmail.com
--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Help building

2009-06-30 Thread Rick Muller
On Tue, Jun 30, 2009 at 9:14 AM, Michael Droettboom md...@stsci.edu wrote:

 What does

  pkg-config libpng --modversion --libs --cflags

 give?

 The pkg-config error may actually be a red herring, since matplotlib will
 look in /usr/local even if pkg-config fails, and it obviously found the
 headers or it wouldn't have gotten to the linking stage.  As the author of
 the pkg-config support I would like to rule that out as the problem though.

 I think it's more likely that the libpng isn't being built correctly to
 match the kind of binary matplotlib is building.  I'm afraid that's where I
 hit the end of my knowledge as a non-Mac user, but I'm sure another Mac
 developer will chime in.


Okay, I just installed pkg-config, and it now finds the proper libpng...

libpng: 1.2.37

However, I still get exactly the same compile problem:

g++ -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g
-bundle -u
ndefined dynamic_lookup build/temp.macosx-10.3-fat-2.6/src/ft2font.o
build/temp.
macosx-10.3-fat-2.6/src/mplutils.o
build/temp.macosx-10.3-fat-2.6/CXX/cxx_extens
ions.o build/temp.macosx-10.3-fat-2.6/CXX/cxxsupport.o
build/temp.macosx-10.3-fa
t-2.6/CXX/IndirectPythonInterface.o
build/temp.macosx-10.3-fat-2.6/CXX/cxxextens
ions.o -L/usr/local/lib -L/usr/lib -L/usr/X11R6/lib -lfreetype -lz -lstdc++
-lm
-o build/lib.macosx-10.3-fat-2.6/matplotlib/ft2font.so
ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libPng.dylib, file is
not o
f required architecture for architecture ppc
collect2: ld returned 1 exit status
lipo: can't open input file:
/var/folders/tu/tuLdYMqlEm00c5EVXrMQ+U+++TQ/-Tmp-//
ccU5pNn1.out (No such file or directory)
error: command 'g++' failed with exit status 1

-- 
Rick Muller
rpmul...@gmail.com
--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Help building (problems with pkg-config and libpng)

2009-06-30 Thread Rick Muller
I have a working system now. Here's what I did to fix it.

1. Installed libpng from source
2. Installed freetype2 from source
3. Installed pkg-config from source
4. Installed a new version of the Xcode developer tools for the mac.

During the build I still saw a few 'incompatible architecture' errors flash
by, but I guess they weren't serious enough for the build to stop.

On Tue, Jun 30, 2009 at 9:51 AM, Rick Muller rpmul...@gmail.com wrote:



 On Tue, Jun 30, 2009 at 9:14 AM, Michael Droettboom md...@stsci.eduwrote:

 What does

  pkg-config libpng --modversion --libs --cflags

 give?

 The pkg-config error may actually be a red herring, since matplotlib will
 look in /usr/local even if pkg-config fails, and it obviously found the
 headers or it wouldn't have gotten to the linking stage.  As the author of
 the pkg-config support I would like to rule that out as the problem though.

 I think it's more likely that the libpng isn't being built correctly to
 match the kind of binary matplotlib is building.  I'm afraid that's where I
 hit the end of my knowledge as a non-Mac user, but I'm sure another Mac
 developer will chime in.


 Okay, I just installed pkg-config, and it now finds the proper libpng...

 libpng: 1.2.37

 However, I still get exactly the same compile problem:

 g++ -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -g
 -bundle -u
 ndefined dynamic_lookup build/temp.macosx-10.3-fat-2.6/src/ft2font.o
 build/temp.
 macosx-10.3-fat-2.6/src/mplutils.o
 build/temp.macosx-10.3-fat-2.6/CXX/cxx_extens
 ions.o build/temp.macosx-10.3-fat-2.6/CXX/cxxsupport.o
 build/temp.macosx-10.3-fa
 t-2.6/CXX/IndirectPythonInterface.o
 build/temp.macosx-10.3-fat-2.6/CXX/cxxextens
 ions.o -L/usr/local/lib -L/usr/lib -L/usr/X11R6/lib -lfreetype -lz -lstdc++
 -lm
 -o build/lib.macosx-10.3-fat-2.6/matplotlib/ft2font.so
 ld: in /Developer/SDKs/MacOSX10.4u.sdk/usr/local/lib/libPng.dylib, file is
 not o
 f required architecture for architecture ppc
 collect2: ld returned 1 exit status
 lipo: can't open input file:
 /var/folders/tu/tuLdYMqlEm00c5EVXrMQ+U+++TQ/-Tmp-//
 ccU5pNn1.out (No such file or directory)
 error: command 'g++' failed with exit status 1

 --
 Rick Muller
 rpmul...@gmail.com




-- 
Rick Muller
rpmul...@gmail.com
--
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users