Re: [Matplotlib-users] missing lines on graph with upgrade to 0.98.0
It seems like it does not connect the last point to the first point. This also happens with the matplotlib.patches Polygon. from pylab import fill, xlim, ylim, savefig x1, x2, y1, y2 = -4, 4, -4, 4 fill([x1,x2,x2,x1], [y1,y1,y2,y2], fc='None', ec='r') xlim(-5,5) ylim(-5,5) savefig('edge_test') On Thu, Jun 5, 2008 at 1:18 AM, Eric Firing [EMAIL PROTECTED] wrote: Bryan Fodness wrote: I just upgraded to 0.98.0 and recreated a few graphs. I am missing parts of the edges of a fill and polygon. Any suggestions? Please post an illustrative script, as simple as possible. Eric -- The game of science can accurately be described as a never-ending insult to human intelligence. - João Magueijo - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] fill function
Is there a way to get the underlying array that the fill function uses to graph a polygon? This is assuming that it uses an array. I would like to be able to multiple an array by an array that describes the polygon (one if inside the polygon and zero if outside) -- The game of science can accurately be described as a never-ending insult to human intelligence. - João Magueijo - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] deb or rpm packages
Hi I can't find any deb package of matplotlib in the url that you gave me. The sources are there but I'm not interested in the sources since I can find them on the official website of matplotlib. Is there any problem ? Thanks for the answer by the way. Johan mazel 2008/6/3 Andrew Straw [EMAIL PROTECTED]: I have .debs for Ubuntu Hardy available at http://debs.astraw.com/hardy/ . Note that these packages don't follow all Debian/Ubuntu guidelines and are of lower quality than the official packages, which I recommend over these. Nevertheless, I've packaged these things up for my personal and my laboratory's use, and anyone is welcome to use them, too. As always, please let me know if you find any bugs. (The source .dsc packages are also available at the same site, and might work with recompilation for Debian testing and possibly older Ubuntu versions.) -Andrew Johan Mazel wrote: Hi I'd like to know when the latest packages in *.deb or *.rpm (from the 0.98.0 version) will be available in the repositories ? If you have any addresses of custom repositories where I could get this package, it would be nice too. I prefer to have a package installed than installed the software myself since I think it would be easier for me if I want to uninstall it. Thanks. Johan Mazel - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] deb or rpm packages
Johan Mazel wrote: Hi I can't find any deb package of matplotlib in the url that you gave me. The sources are there but I'm not interested in the sources since I can find them on the official website of matplotlib. Is there any problem ? Thanks for the answer by the way. Johan mazel They are there. For i386: http://debs.astraw.com/hardy/python-matplotlib_0.98.0-0ads2_i386.deb For amd64: http://debs.astraw.com/hardy/python-matplotlib_0.98.0-0ads2_amd64.deb For all arch: http://debs.astraw.com/hardy/python-matplotlib-data_0.98.0-0ads2_all.deb http://debs.astraw.com/hardy/python-matplotlib-doc_0.98.0-0ads2_all.deb - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] fill function
I just read your question more closely -- that you want to multiply an array by an array that describes the polygon. Do you mean the array of vertices that describe the polygon or something like a 2D rasterization (image) of the polygon? I perhaps wrongfully assumed you just wanted to do hit-testing on a polygon. What I was thinking (and this still may be relevant to your problem) was: from matplotlib.path import Path # Create a unit square path = Path([[0, 0], [1, 0], [1, 1], [0, 1], [0, 0]]) # Test for some points that are inside and outside of the square assert path.contains_point([0.5, 0.5]) assert not path.contains_point([1.5, 0.5]) If you want to get an image of the polygon, it's probably theoretically doable, but won't be straightforward. It will involve working directly with the Agg backend, I think. Let me know your use case is, and we can step through that. Perhaps there's another way to achieve the same end result that won't require as much wrestling. Cheers, Mike Bryan Fodness wrote: Could you help me set this up? I am still fairly new to python. On Thu, Jun 5, 2008 at 1:05 PM, Michael Droettboom [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: If you're using 0.98, you can create a Path object (see path.py) from your polygon and then use the point_in_polygon method to test whether a point is inside or outside the polygon. This doesn't require rendering the polygon at all and works entirely in vector space. Let me know if you need help with the details. Cheers, Mike Bryan Fodness wrote: Is there a way to get the underlying array that the fill function uses to graph a polygon? This is assuming that it uses an array. I would like to be able to multiple an array by an array that describes the polygon (one if inside the polygon and zero if outside) -- The game of science can accurately be described as a never-ending insult to human intelligence. - João Magueijo - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net mailto:Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA -- The game of science can accurately be described as a never-ending insult to human intelligence. - João Magueijo -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] missing lines on graph with upgrade to 0.98.0
Bryan, Thanks for pointing this out. Mike D. has made a change in the svn trunk to restore the automatic closing of polygons made with the patches.Polygon constructor, which is used by the fill command. Eric Bryan Fodness wrote: It seems like it does not connect the last point to the first point. This also happens with the matplotlib.patches Polygon. from pylab import fill, xlim, ylim, savefig x1, x2, y1, y2 = -4, 4, -4, 4 fill([x1,x2,x2,x1], [y1,y1,y2,y2], fc='None', ec='r') xlim(-5,5) ylim(-5,5) savefig('edge_test') On Thu, Jun 5, 2008 at 1:18 AM, Eric Firing [EMAIL PROTECTED] mailto:[EMAIL PROTECTED] wrote: Bryan Fodness wrote: I just upgraded to 0.98.0 and recreated a few graphs. I am missing parts of the edges of a fill and polygon. Any suggestions? Please post an illustrative script, as simple as possible. Eric -- The game of science can accurately be described as a never-ending insult to human intelligence. - João Magueijo - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Build matplotlib 0.98 on OSX
Is this really the current solution to building matplotlib on OSX, installing a new compiler and hacking the python Makefile? I was able to build matplotlib 0.91.2 just fine on OSX, sometime around March I checked out the truck to fix a bug and discovered I couldn't build the svn version. Matplotlib is the only package with a dependency on gcc 4.2, all the other packages I build, numpy, scipy, ipython, etc... build with gcc 4.0. Why do you have this dependency? Is there an easier solution? I'm reluctant to upgrade to gcc 4.2 and loose the ability to build other packages I need. Chris On Thu, May 29, 2008 at 4:51 AM, Joshua Lippai [EMAIL PROTECTED] wrote: I've consistently been able to build matplotlib on OS X. Just make sure you have all the dependencies installed. Personally, I have lbpng and whatnot installed in /usr/local instead of /usr/X11. I don't know if that'll help. Also, I use the GCC 4.2 that Apple has available for download on developer.apple.com. Then you just change the Makefile in the /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/config/ directory to not use Wno-long-double or no-cpp-precomp. I also took out all the ppc arch flags since it was causing some issues there with my versions of libpng and whatnot technically not being universal binaries. If you don't want to build univeral binary versions of your dependencies or use the ones alread provided in /usr/X11 (which are universal I think), you should make Python only build for your architecture, which is what I did. My only issue with matplotlib thusfar seems to be the inability to do the plot3d examples from the scipy website, but I'm told that stuff is officially unsupported anyway. Josh -- Christopher Burns Computational Infrastructure for Research Labs 10 Giannini Hall, UC Berkeley phone: 510.643.4014 http://cirl.berkeley.edu/ - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] easy_install and eggs
The problem appears to be the -fat at the end of the file name. The filename 'matplotlib-0.98.0-py2.5-macosx-10.3-fat.egg' _works_, but then downloads the tarball and tries to build the source, which _fails_ with gcc 4.0. Perhaps rename the egg and repost to sourceforge? This WORKS: ## [EMAIL PROTECTED] $ cp matplotlib-0.98.0-py2.5-macosx-10.3-fat.egg matplotlib-0.98.0-py2.5-macosx-10.3.egg [EMAIL PROTECTED] $ easy_install matplotlib-0.98.0-py2.5-macosx-10.3.egg Processing matplotlib-0.98.0-py2.5-macosx-10.3.egg creating /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.0-py2.5-macosx-10.3.egg Extracting matplotlib-0.98.0-py2.5-macosx-10.3.egg to /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages Removing matplotlib 0.98.0 from easy-install.pth file Adding matplotlib 0.98.0 to easy-install.pth file Installed /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.0-py2.5-macosx-10.3.egg Processing dependencies for matplotlib==0.98.0 Finished processing dependencies for matplotlib==0.98.0 The long name WORKS BUT then downloads the tarball and the build FAILS: ## [EMAIL PROTECTED] $ easy_install ./matplotlib-0.98.0-py2.5-macosx-10.3-fat.egg Processing matplotlib-0.98.0-py2.5-macosx-10.3-fat.egg removing '/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.0-py2.5-macosx-10.3-fat.egg' (and everything under it) creating /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.0-py2.5-macosx-10.3-fat.egg Extracting matplotlib-0.98.0-py2.5-macosx-10.3-fat.egg to /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages Removing matplotlib 0.91.2svn from easy-install.pth file Adding matplotlib 0.98.0 to easy-install.pth file Installed /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-packages/matplotlib-0.98.0-py2.5-macosx-10.3-fat.egg Processing dependencies for matplotlib==0.98.0 Searching for matplotlib==0.98.0 Reading http://pypi.python.org/simple/matplotlib/ Reading http://matplotlib.sourceforge.net Reading https://sourceforge.net/project/showfiles.php?group_id=80706package_id=82474 Reading https://sourceforge.net/project/showfiles.php?group_id=80706package_id=278194 Reading http://sourceforge.net/project/showfiles.php?group_id=80706package_id=82474 Reading http://sourceforge.net/project/showfiles.php?group_id=80706 Best match: matplotlib 0.98.0 Downloading http://downloads.sourceforge.net/matplotlib/matplotlib-0.98.0.tar.gz?modtime=1212104461big_mirror=0 Processing matplotlib-0.98.0.tar.gz Running matplotlib-0.98.0/setup.py -q bdist_egg --dist-dir /var/folders/Yd/Yd035yKSFsquGZJJL5FzVE+++TI/-Tmp-/easy_install-aJSbMP/matplotlib-0.98.0/egg-dist-tmp-0gX7af BUILDING MATPLOTLIB matplotlib: 0.98.0 python: 2.5.2 (r252:60911, Feb 22 2008, 07:57:53) [GCC 4.0.1 (Apple Computer, Inc. build 5363)] platform: darwin REQUIRED DEPENDENCIES numpy: 1.2.0.dev5252 freetype2: 9.16.3 OPTIONAL BACKEND DEPENDENCIES libpng: 1.2.24 Tkinter: Tkinter: 50704, Tk: 8.4, Tcl: 8.4 wxPython: 2.8.7.1 * WxAgg extension not required for wxPython = 2.8 Gtk+: no * Building for Gtk+ requires pygtk; you must be able * to import gtk in your build/install environment Qt: no Qt4: no Cairo: no OPTIONAL DATE/TIMEZONE DEPENDENCIES datetime: present, version unknown dateutil: matplotlib will provide pytz: matplotlib will provide OPTIONAL USETEX DEPENDENCIES dvipng: no ghostscript: /bin/sh: gs: command not found latex: no EXPERIMENTAL CONFIG PACKAGE DEPENDENCIES configobj: matplotlib will provide enthought.traits: matplotlib will provide [Edit setup.cfg to suppress the above messages] warning: no files found matching 'NUMARRAY_ISSUES' warning: no files found matching 'MANIFEST' warning: no files found matching 'matplotlibrc' warning: no files found matching 'makeswig.py' warning: no files found matching 'lib/mpl_toolkits' no previously-included directories found matching 'examples/_tmp_*' warning: no files found matching '*' under directory 'swig' In file included from /usr/X11/include/freetype2/freetype/freetype.h:41, from src/ft2font.h:14, from src/ft2font.cpp:1:
Re: [Matplotlib-users] Build matplotlib 0.98 on OSX
'make build_osx105' worked great, thank you! Sorry I didn't see that earlier. On Thu, Jun 5, 2008 at 6:50 PM, John Hunter [EMAIL PROTECTED] wrote: On Thu, Jun 5, 2008 at 4:19 PM, Christopher Burns [EMAIL PROTECTED] wrote: Is this really the current solution to building matplotlib on OSX, installing a new compiler and hacking the python Makefile? I was able to build matplotlib 0.91.2 just fine on OSX, sometime around March I checked out the truck to fix a bug and discovered I couldn't build the svn version. Matplotlib is the only package with a dependency on gcc 4.2, all the other packages I build, numpy, scipy, ipython, etc... build with gcc 4.0. Why do you have this dependency? Is there an easier solution? I'm reluctant to upgrade to gcc 4.2 and loose the ability to build other packages I need. An upgrade to 4.2 is not required. On the svn trunk (0.98) there is a bug in the apple gcc compiler with our agg extension that causes a compiler error if the optimization level is -O3. You can work around it by using -Os instead. I build with the default apple compiler and have a line in the Makefile in the mpl src dir that reads:: build_osx105: CFLAGS=-Os -arch i386 -arch ppc LDFLAGS=-Os -arch i386 -arch ppc python setup.py build Some of the other suggested tricks like editing the Python Makefile configs may be handy so you don't have to pass around CFLAGS and LDFLAGS, but they are in no way required. My build notes are at: http://ipython.scipy.org/moin/Py4Science/InstallationOSX but I need to update them with the info in this email. Don't ignore the pkgconfig stuff, as it is helpful to help find freetype and libpng. Here is my build output:: home:~/mpl rm -rf build home:~/mpl gcc --version i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5465) home:~/mpl make build_osx105 build.out -- Christopher Burns Computational Infrastructure for Research Labs 10 Giannini Hall, UC Berkeley phone: 510.643.4014 http://cirl.berkeley.edu/ - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users