Re: [Matplotlib-users] plot Africa only
Hi Tommy, there is not easy way to do it with matplolib+basemap. Also, you will find it extra hard because the image you are plotting (blue marble) is raster that is cut in lon, lat bounding box. Therefore, unless you create a mask around what to plot and what not to plot, it will show everything that is inside that box. One alternative is cartopy. With cartopy you have easy access to Natural Earth features. That way you can find the proper feature, that represents just the African continent, and plot it: http://scitools.org.uk/cartopy/docs/latest/examples/hurricane_katrina.html https://ocefpaf.github.io/python4oceanographers/blog/2013/09/30/natural_earth/ Good luck! -Filipe On Fri, Oct 24, 2014 at 7:21 AM, Tommy Carstensen tommy.carsten...@gmail.com wrote: Does anyone know, whether a continent can be left out when plotting with matplotlib basemap? For example I wish to hide Europe (and Madagascar) on this plot: http://www.tommycarstensen.com/python3_matplotlib_basemap_merc_bluemarbleTrue_scaledTrue_1000GTrue_hresolution.jpg -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Drag, add, remove points from a plot with the mouse
After some modifications and manual reading I got insert point and delete point working, but I still cannot make the drag point work... -Filipe On Wed, Sep 12, 2012 at 4:04 PM, Filipe Pires Alvarenga Fernandes ocef...@gmail.com wrote: Hi all, I am trying to create a class to edit the points of a plot based on the poly_editor.py example. However, I have very little experience with even handling and I need some help. Here is what I did so far, the toggle on/off works fine. Also I believe that actions press, release, insert, delete are OK. However, I am stuck at the drawing part of the problem. if anyone have an example of that to share or it you want to check what I made so far: http://dl.dropbox.com/u/4411725/point_editor.py Thanks, Filipe. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Drag, add, remove points from a plot with the mouse
OK, a little bit more of manual reading I got the drag point working. Now, even though it works, I would like the opinion of someone with more experience on event handling to improve that. Thanks, Filipe On Wed, Sep 12, 2012 at 6:14 PM, Filipe Pires Alvarenga Fernandes ocef...@gmail.com wrote: After some modifications and manual reading I got insert point and delete point working, but I still cannot make the drag point work... -Filipe On Wed, Sep 12, 2012 at 4:04 PM, Filipe Pires Alvarenga Fernandes ocef...@gmail.com wrote: Hi all, I am trying to create a class to edit the points of a plot based on the poly_editor.py example. However, I have very little experience with even handling and I need some help. Here is what I did so far, the toggle on/off works fine. Also I believe that actions press, release, insert, delete are OK. However, I am stuck at the drawing part of the problem. if anyone have an example of that to share or it you want to check what I made so far: http://dl.dropbox.com/u/4411725/point_editor.py Thanks, Filipe. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Possible bug with saving eps figure
Hi, this is not a big deal, but I think that there is a bug while saving eps figures and passing the linewidth='2.5' as string instead of float. The following reproduces the error I get here: plt.plot([1,2,3], 'k', linewidth='2.5') plt.savefig('teste.png') # Saves OK # The following fails with linewidth='2.5', but passes with linewidth=2.5 # TypeError: float argument required, not str plt.savefig('teste.eps') plt.show() # show is OK for both cases. matplotlib.__version__ Out[2]: '1.2.x' -Filipe -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Possible bug with saving eps figure
Yep, that's what I was expecting. It should fail with both show() and the save as 'png' format. However, it only fails when trying to save an 'eps' -Filipe On Mon, May 7, 2012 at 1:12 PM, Benjamin Root ben.r...@ou.edu wrote: On Mon, May 7, 2012 at 12:55 PM, Michael Droettboom md...@stsci.edu wrote: That's not a bug. linewidth is required to be a float, rather than a string. Python's typing is generally a little stricter than languages such as JavaScript. Mike I think the bigger question is why does it _work_ with show()? I would expect it to fail. I would rather have it fail everywhere or work everywhere. Ben Root -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Fwd: Matplotlib gallery
Just a suggestion. All these ideas sounds like a google code-in task. http://code.google.com/intl/pt-BR/opensource/gci/2010-11/ I do not know if Matplotlib participated in the past, if not take a look of last years sympy task list: https://github.com/sympy/sympy/wiki/GCI-2011-Task-list If the ideas for the gallery improvement are break down to some simple tasks like that you guys could use Google code-in to do it. -Filipe On Thu, Feb 23, 2012 at 11:46, Benjamin Root ben.r...@ou.edu wrote: On Thu, Feb 23, 2012 at 10:41 AM, Tony Yu tsy...@gmail.com wrote: On Thu, Feb 23, 2012 at 11:32 AM, josef.p...@gmail.com wrote: I will never get use to reply-all -- Forwarded message -- From: josef.p...@gmail.com Date: Thu, Feb 23, 2012 at 11:31 AM Subject: Re: [Matplotlib-users] Matplotlib gallery To: Nicolas Rougier nicolas.roug...@inria.fr On Thu, Feb 23, 2012 at 11:24 AM, Nicolas Rougier nicolas.roug...@inria.fr wrote: I agree, but the current matplotlib gallery is rather clueless about what the examples are related to until you click an image. I'm personally using the gallery by looking at an example that match what I've in mind most closely and then look at the code. But you're right, some structure(s) would definitely help. Here is an example of a well structured gallery: http://www.gigawiz.com/aagraphs.html. The first-level structure is organized at: Specialized Scientific Graphing Scatter Graphs Contour Charts (2-D, 3-D, and Ternary) Heatmaps Voronoi Diagram Waterfall Charts Bubble Charts Spider Charts Polar Charts Column and Bar Charts Area Charts Line Charts Combination Charts (Column-Line, Bar-Line, Area-Line) Diagrams of Multiple, Independent Value-Axes Column, Bar or Area Graphs High-Low, (Open)-High-Low-Close, and Range Charts Pie Charts and X-Y Scatter Pie Vector Charts Statistical Charts Maybe we can find/agree on similar structure(s)/sub-structure(s) and adapt it to the current gallery ? An advantage of the current all in one page gallery is that it is easier to find a recipe when I just look for individual plot elements, when I have not much idea what it might be called and just some idea what it should look like. That's different from looking for plots with a specific usage or content. Josef You could still have a one-page gallery with plots separated into subheadings (and a table of contents at the top which allows you to jump to subheadings). This alone would greatly improve navigation in the gallery. The list of headings is great, by the way. -Tony I am banging out a pull request to do just that. Ben Root -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Virtualization Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Basemap shapelib change from 1.0.1 to 1.0.2
On Thu, Oct 6, 2011 at 14:50, Jeff Whitaker jsw...@fastmail.fm wrote: On 9/29/11 9:44 AM, Filipe Pires Alvarenga Fernandes wrote: Hi I noticed that Basemap 1.0.2 will replace the old pyshapelib with the pure python shapelib.py. However, that did break some of my scripts when I use custom shapefiles. Here is a picture from Basemap 1.0.1, http://imageshack.us/photo/my-images/69/basemap101.png/ and here the same script under Basemap 1.0.2, http://imageshack.us/photo/my-images/854/basemap102.png/ and here is the script: http://pastebin.com/WfePCFJi It probably has something to do with the way shapelib.py handle the lines, As soon as I have some time I'll take a better look into that, but I would like to ask if anyone has seen this before and/or if you have a suggestion/solution for it. Thanks, Filipe Filipe: Were you able to resolve this? I just updated shapefile.py in the git repository, so you might try again on the off chance a bug was fixed. If the problem still persists, please point me to a shapefile that triggers the problem. -Jeff Thanks, but the problem persists. I haven't got time to look into it yet, as soon as I do I'll get back to you. Regarding the shapefile, I do not remember the official source anymore, but you can get a copy here: https://build.opensuse.org/package/files?package=python-basemapproject=home%3Aocefpaf Thanks again, Filipe -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : jeffrey.s.whita...@noaa.gov 325 Broadway Office : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg -- All of the data generated in your IT infrastructure is seriously valuable. Why? It contains a definitive record of application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-d2dcopy2 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] matplotlib - fill open path inside U.S. borders + sample map
On Wed, Sep 28, 2011 at 16:39, Jeff Whitaker jsw...@fastmail.fm wrote: On 9/28/11 2:19 PM, Isidora wrote: Hi Filipe, I have just seen your answers. I am trying to plot on a background GIF map, lines like the ones you can see in http://www.spc.noaa.gov/products/outlook/day1probotlk_2000_wind.gif. I can plot the lines as you see them in this link without a problem. However, because those lines are not closed polygons, the filling extends only to a straight line between first and last point of the curve. I want the filling to extend all the way to the border of United States. Since drawcountries() return a Collection of paths without any metadata identifying the country/countries been separated by it, I cannot use it to mask the area outside ofthe borders out. I'd appreciate any link/documentation I could read to help me resolve this issue. Thank you Isidora Nobody has tried to do this (that I know of), so I can't point you to anything specific. Did you see my message about creating a gridded field (say 1's for points inside and 0's for points outside the region), the calling contour to draw the line? You can use the is_land method to determine if a point is over land or not, but there is not way to determine whether a given point is inside a country. As you found out, there is no metadata associated with the coastlines or political boundary lines. The fillcontinents method returns a list matplotlib polygon instances that represent the land areas. One of them is North America, and could be used to clip your line segments - but there is no easy way to determine which one it is. If you can find a shapefile that just contains a CONUS polygon, you could use that I suppose. I guess that Jeff suggestion of manipulation a shapefile might be the easiest way to do this, here is an example that might help you. http://www.geophysique.be/en/2011/01/27/matplotlib-basemap-tutorial-07-shapefiles-unleached/ -Filipe -Jeff -- Jeffrey S. Whitaker Phone : (303)497-6313 Meteorologist FAX : (303)497-6449 NOAA/OAR/PSD R/PSD1 Email : jeffrey.s.whita...@noaa.gov 325 Broadway Office : Skaggs Research Cntr 1D-113 Boulder, CO, USA 80303-3328 Web : http://tinyurl.com/5telg -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Basemap shapelib change from 1.0.1 to 1.0.2
Hi I noticed that Basemap 1.0.2 will replace the old pyshapelib with the pure python shapelib.py. However, that did break some of my scripts when I use custom shapefiles. Here is a picture from Basemap 1.0.1, http://imageshack.us/photo/my-images/69/basemap101.png/ and here the same script under Basemap 1.0.2, http://imageshack.us/photo/my-images/854/basemap102.png/ and here is the script: http://pastebin.com/WfePCFJi It probably has something to do with the way shapelib.py handle the lines, As soon as I have some time I'll take a better look into that, but I would like to ask if anyone has seen this before and/or if you have a suggestion/solution for it. Thanks, Filipe -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Fw: matplotlib - fill open path inside U.S. borders + sample map
Hi Isidora, in the past I used the matlab function below for a similar task. Maybe it can be adapted to your problem. If you can provide a small sample of your problem I can try to implement that in python (it has been in my TODO list for a while, but i cannot promise.) http://woodshole.er.usgs.gov/operations/sea-mat/mapstuff-html/join_cst.m -Filipe On Wed, Sep 28, 2011 at 09:39, Jeff Whitaker jsw...@fastmail.fm wrote: On 9/27/11 5:37 PM, Jeff Whitaker wrote: On 9/27/11 4:57 PM, Isidora wrote: The attached map shows plotted fill paths whose filling extends only to the U.S. borders. Is there any way I could accomplish something like it using Basemap? Thanks Isidora: It's probably possible, but there's no simple recipe. The drawcoastlines method returns a LineCollection which you should be able to use to do what you want. Sorry I can't be more specific, but I don't have time to go into any more depth right now. -Jeff Isidora: Another option would be to create a gridded field defining the area you would like to enclose, use contourf to draw the boundaries of the region, then mask out the ocean areas with the maskoceans function. -Jeff -- Forwarded Message -- From: Isidora isid...@juno.com To: matplotlib-users@lists.sourceforge.net Subject: matplotlib - fill open path inside U.S. borders Date: Mon, 26 Sep 2011 19:55:49 GMT Hi, I am trying to plot filled paths over a U.S. map. I plot the given paths, but since these are not closed paths, the filling is truncated at a line drawn between last and first point in the path. I want to extend the path to the United States border instead. I am no expert in matplotlib or GIS. Could anyone help me find documentation or blogs discussing this type of issue? I am convinced somebody else has already faced this problem although I have not been able to find any paper, documentation, blog on it. Thank you -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity and more. Splunk takes this data and makes sense of it. Business sense. IT sense. Common sense. http://p.sf.net/sfu/splunk-d2dcopy1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Problems installing Matplotlib under SUSE SLES 11 SP1
Hi, On SUSE you have zypper I'm not familiar with SUSE repos, but OpenSUSE repos do have matplotlib, just type: sudo zypper in python-matplolib that should install it for you. -Filipe On Thu, Sep 15, 2011 at 14:22, John Hunter jdh2...@gmail.com wrote: On Thu, Sep 15, 2011 at 11:42 AM, falbriard clau...@br.ibm.com wrote: Thanks Michael for your quick reply. I will consider use of the yum tool to install the per-requisite and future updates. Meanwhile I got a step forwards with help of the freetype developer forum and I succeeded to build the freetype2 from the source. So I've also repeated the python setup.py build which gave me a new error message cannot find -lz . See the linker command below: g++ -pthread -shared build/temp.linux-s390x-2.6/src/ft2font.o build/temp.linux-s390x-2.6/src/mplutils.o build/temp.linux-s390x-2.6/CXX/IndirectPythonInterface.o build/temp.linux-s390x-2.6/CXX/cxx_extensions.o build/temp.linux-s390x-2.6/CXX/cxxsupport.o build/temp.linux-s390x-2.6/CXX/cxxextensions.o -L/usr/local/lib -L/usr/local/lib -L/usr/lib -L/usr/local/lib64 -L/usr/lib64 -L/usr/lib64 -lfreetype -lz -lstdc++ -lm -lpython2.6 -o build/lib.linux-s390x-2.6/matplotlib/ft2font.so /usr/lib64/gcc/s390x-suse-linux/4.3/../../../../s390x-suse-linux/bin/ld: cannot find -lz That error means mpl could not find libz, which probably means you don't have libpng installed either. mpl has a fair number of dependencies. See http://matplotlib.sourceforge.net/users/installing.html#build-requirements On debian systems, there is a brilliant command apt-get build-dep python-matplotlib which will install everything you need to build mpl from source. SUSE is RPM based: is there anything equivalent in rpm yum land? -- Doing More with Less: The Next Generation Virtual Desktop What are the key obstacles that have prevented many mid-market businesses from deploying virtual desktops? How do next-generation virtual desktops provide companies an easier-to-deploy, easier-to-manage and more affordable virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Doing More with Less: The Next Generation Virtual Desktop What are the key obstacles that have prevented many mid-market businesses from deploying virtual desktops? How do next-generation virtual desktops provide companies an easier-to-deploy, easier-to-manage and more affordable virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Problems installing Matplotlib under SUSE SLES 11 SP1
On Thu, Sep 15, 2011 at 14:34, John Hunter jdh2...@gmail.com wrote: On Thu, Sep 15, 2011 at 1:31 PM, Filipe Pires Alvarenga Fernandes ocef...@gmail.com wrote: Hi, On SUSE you have zypper I'm not familiar with SUSE repos, but OpenSUSE repos do have matplotlib, just type: sudo zypper in python-matplolib that should install it for you. And if you want to build mpl from src, eg to track current development, is there a way in opensuse to automatically install all the build dependencies for python-matplotlib? Yes, all you have to do is write a script that install all the depencies with sudo zypper in To get a list of the dependencies in OpenSUSE names you can check this spec file and install everything flagged as BuildRequires: https://build.opensuse.org/package/view_file?file=python-matplotlib.specpackage=python-matplotlibproject=home%3Aocefpafsrcmd5=c5a84278ace03073116b104df3e303e3 However, I recommend non-developer to use a packaged version. I maintain a weekly git checkout of matplotlib for OpenSUSE in my home repo here: http://download.opensuse.org/repositories/home:/ocefpaf/openSUSE_11.4/ (for 11.4) http://download.opensuse.org/repositories/home:/ocefpaf/openSUSE_Tumbleweed/ (for Tumbleweed) and here is a list with all the packages in those repos if some is interested: https://build.opensuse.org/project/packages?project=home%3Aocefpaf https://build.opensuse.org/project/packages?project=home%3Aocefpaf%3AETS -Filipe. -- Doing More with Less: The Next Generation Virtual Desktop What are the key obstacles that have prevented many mid-market businesses from deploying virtual desktops? How do next-generation virtual desktops provide companies an easier-to-deploy, easier-to-manage and more affordable virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Problems installing Matplotlib under SUSE SLES 11 SP1
On Thu, Sep 15, 2011 at 14:48, Filipe Pires Alvarenga Fernandes ocef...@gmail.com wrote: On Thu, Sep 15, 2011 at 14:34, John Hunter jdh2...@gmail.com wrote: On Thu, Sep 15, 2011 at 1:31 PM, Filipe Pires Alvarenga Fernandes ocef...@gmail.com wrote: Hi, On SUSE you have zypper I'm not familiar with SUSE repos, but OpenSUSE repos do have matplotlib, just type: sudo zypper in python-matplolib that should install it for you. And if you want to build mpl from src, eg to track current development, is there a way in opensuse to automatically install all the build dependencies for python-matplotlib? Yes, all you have to do is write a script that install all the depencies with sudo zypper in To get a list of the dependencies in OpenSUSE names you can check this spec file and install everything flagged as BuildRequires: https://build.opensuse.org/package/view_file?file=python-matplotlib.specpackage=python-matplotlibproject=home%3Aocefpafsrcmd5=c5a84278ace03073116b104df3e303e3 However, I recommend non-developer to use a packaged version. I maintain a weekly git checkout of matplotlib for OpenSUSE in my home repo here: http://download.opensuse.org/repositories/home:/ocefpaf/openSUSE_11.4/ (for 11.4) http://download.opensuse.org/repositories/home:/ocefpaf/openSUSE_Tumbleweed/ (for Tumbleweed) and here is a list with all the packages in those repos if some is interested: https://build.opensuse.org/project/packages?project=home%3Aocefpaf https://build.opensuse.org/project/packages?project=home%3Aocefpaf%3AETS -Filipe. Just found this script that emulates the apt build dep: http://lilypond.org/~janneke/software/suse/zypper-build-dep -Filipe -- Doing More with Less: The Next Generation Virtual Desktop What are the key obstacles that have prevented many mid-market businesses from deploying virtual desktops? How do next-generation virtual desktops provide companies an easier-to-deploy, easier-to-manage and more affordable virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Since upgrading to SUSE 11.3 matplotlib simply craches with segfault
Since you are using OpenSuse, (and If you are brave enough) you can add my REPO and use the latest version of matplolib: http://download.opensuse.org/repositories/home:/ocefpaf/openSUSE_11.3/ I compile the svn version every week there. Filipe. On Mon, Nov 15, 2010 at 13:45, Michael Droettboom md...@stsci.edu wrote: Since their package is crashing, I would report this bug against OpenSUSE's python-matplotlib package. If that doesn't get you any response, it would be helpful to get a better idea of where it is failing. Can you provide a gdb backtrace? Mike -- Centralized Desktop Delivery: Dell and VMware Reference Architecture Simplifying enterprise desktop deployment and management using Dell EqualLogic storage and VMware View: A highly scalable, end-to-end client virtualization framework. Read more! http://p.sf.net/sfu/dell-eql-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] installation question
Hi Bala, Strange that yum did not updated, Fedora does has the latest version packaged: http://koji.fedoraproject.org/koji/packageinfo?packageID=3607 Maybe you can try to force the installation of the latest rpm by downloading it and installing it with yum. * Filipe Pires Alvarenga Fernandes, PhD Candidate School of Marine Science and Technology University of Massachusetts at Dartmouth 706 Rodney French Blvd., New Bedford, MA 02744 Email: falvarengafernan...@umassd.edu ocef...@gmail.com http://ocefpaf.tiddlyspot.com/ * On Thu, Oct 21, 2010 at 06:46, Bala subramanian bala.biophys...@gmail.com wrote: Friends, I am using mpl in fedora10. I installed mpl (version 0.98.5.2) with yum previously. Since yum does not upgrade to latest mpl version, i have downloaded the tarball to install from the source. Now i want to install mpl in the same location as previously done by yum (info. given below). 1) How can force the installation to the same location as done by yum. 2) Will there be anyproblem if i overwrite old one with new installation. import matplotlib matplotlib.__version__ '0.98.5.2' matplotlib.__file__ '/usr/lib/python2.5/site-packages/matplotlib/__init__.pyc' Thank you, Bala -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Nokia and ATT present the 2010 Calling All Innovators-North America contest Create new apps games for the Nokia N8 for consumers in U.S. and Canada $10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store http://p.sf.net/sfu/nokia-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] How to colorize the ticklabels using host.parasite
I was wondering if there is a way to get a effect similar to this example: http://matplotlib.sourceforge.net/examples/api/two_scales.html?highlight=codex%20two%20scale Here The yticklabels have the same color as the label, but using host/parasite: http://matplotlib.sourceforge.net/examples/axes_grid/demo_parasite_axes2.html I tried: for tl in host.axis[right].axis.axes.get_xticklabels(): tl.set_color('b') without success. Thanks, Filipe. -- Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] How to colorize the ticklabels using host.parasite
On Mon, Sep 27, 2010 at 14:15, Aman Thakral aman.thak...@gmail.com wrote: I think you're looking at an old example. Have a look at this one: http://matplotlib.sourceforge.net/examples/pylab_examples/multiple_yaxis_with_spines.html Is that the desire effect? Yes, thanks. Regards, Aman It did not though. I'm not sure why. Could someone please clarify? On Mon, Sep 27, 2010 at 12:35 PM, Filipe Pires Alvarenga Fernandes ocef...@gmail.com wrote: I was wondering if there is a way to get a effect similar to this example: http://matplotlib.sourceforge.net/examples/api/two_scales.html?highlight=codex%20two%20scale Here The yticklabels have the same color as the label, but using host/parasite: http://matplotlib.sourceforge.net/examples/axes_grid/demo_parasite_axes2.html I tried: for tl in host.axis[right].axis.axes.get_xticklabels(): tl.set_color('b') without success. Thanks, Filipe. -- Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Aman Thakral B.Eng Biosci, M.Eng Design -- Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] How to colorize the ticklabels using host.parasite
On Mon, Sep 27, 2010 at 20:10, Jae-Joon Lee lee.j.j...@gmail.com wrote: For your original script that uses axes_grid1 toolkit, you can do something like host.axis[left].major_ticklabels.set_color(p1.get_color()) par1.axis[right].major_ticklabels.set_color(p2.get_color()) par2.axis[right].major_ticklabels.set_color(p3.get_color()) Cool, it worked nicely. Note that these are only effective when you use axes_grid1 toolkit. Regards, -JJ On Tue, Sep 28, 2010 at 1:35 AM, Filipe Pires Alvarenga Fernandes ocef...@gmail.com wrote: I was wondering if there is a way to get a effect similar to this example: http://matplotlib.sourceforge.net/examples/api/two_scales.html?highlight=codex%20two%20scale Here The yticklabels have the same color as the label, but using host/parasite: http://matplotlib.sourceforge.net/examples/axes_grid/demo_parasite_axes2.html I tried: for tl in host.axis[right].axis.axes.get_xticklabels(): tl.set_color('b') without success. Thanks, Filipe. -- Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] New subplots from 1.0 + shared axis
On Mon, Aug 9, 2010 at 12:22, Fernando Perez fperez@gmail.com wrote: On Mon, Aug 9, 2010 at 8:48 AM, Filipe Fernandes ocef...@gmail.com wrote: The docstring for sunplots has the sharex(y) option, but my ax are being created now!? Is that a chicken and egg problem? Or I'm failing to understand the logic here. Don't worry: when you indicate that you want to share axes (x or y), subplots() tracks that and enables it as it creates the axis objects. Give it a try and see if it works :) Cheers, f Great, just now I realized that the option is sharex(y)=True/False and no longer sharex=ax1. It sacrifice a more fine control, but simplify the processes for the majority of the plots that I produce. Thanks! -- This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Basemap white space
Thanks for point TKinter to me. However, I'm stuck again. I've tried two approaches, one is following what you suggested: Tkinter import Tkinter as tk root = tk.Tk() from PIL import Image, ImageTk image = ImageTk.PhotoImage(Image.open('map.png')) # load saved image #image = ImageTk.PhotoImage(im) # load image from StringIO tk.Label(root, image=image).pack() The other is to convert the PIL image to array and show with imshow() PIL to array from matplotlib.image import pil_to_array rgba = pil_to_array(Image.open('map.png')) # load saved image #rgba = pil_to_array(im) # load image from StringIO rgba = rgba.astype(np.float32)/255. imshow(rgba) Both work fine for a saved image. However, they return strange errors when I tried to apply them to the image from StringIO, or even for a saved image in the same script used to generate them. I guess that something I import from matplotlib is causing a conflict here. Here are the error messages: Tkinter _tkinter.TclError: image pyimage9 doesn't exist PIL to array terminate called after throwing an instance of 'char const*' I'm attaching the script. Aborted # -*- coding: utf-8 -*- import matplotlib import numpy as np import matplotlib.pyplot as plt import StringIO, Image #matplotlib.use('Agg') matplotlib.use('TkAgg') from mpl_toolkits.basemap import Basemap lonmin = -87.5 lonmax = -22.5 latmin = -59.5 latmax = 14.5 m = Basemap( projection = 'merc', llcrnrlat = latmin, urcrnrlat = latmax, llcrnrlon = lonmin, urcrnrlon = lonmax, resolution = 'c' ) fig = plt.figure() ax = fig.add_subplot(111) m.ax = ax m.bluemarble() trim image imgdata = StringIO.StringIO() fig.savefig(imgdata, dpi=150, format='png') imgdata.seek(0) # rewind the data im = Image.open(imgdata) def trim(im, border): from PIL import ImageChops bg = Image.new(im.mode, im.size, border) diff = ImageChops.difference(im, bg) bbox = diff.getbbox() if bbox: return im.crop(bbox) else: # found no content raise ValueError(cannot trim; image was empty) im = trim(im,'white') PIL to array #from matplotlib.image import pil_to_array #rgba = pil_to_array(Image.open('mapa.png')) ##rgba = pil_to_array(im) #rgba = rgba.astype(np.float32)/255. #imshow(rgba) #show() error when used in the script: terminate called after throwing an instance of 'char const*' Aborted Tkinter import Tkinter as tk root = tk.Tk() from PIL import Image, ImageTk image = ImageTk.PhotoImage(Image.open('mapa.png')) #image = ImageTk.PhotoImage(im) tk.Label(root, image=image).pack() error when used in the script: _tkinter.TclError: image pyimage9 doesn't exist -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Basemap white space
Thanks Friedrich, However, my knowledge of python is very limited, even though I think I understood what you suggested I do not know how to get the shape (of the figure?) for this part: fig.set_size_inches(float(shape[0]) / dpi, float(shape[1]) / dpi) error is: Traceback (most recent call last): File blueearth-map.py, line 108, in module fig.set_size_inches(float(shape[0]) / dpi, float(shape[1]) / dpi) TypeError: 'function' object is unsubscriptable It seems that it ended up calling a function shape instead of a variable shape. I'm sending attached the script if you are interested in looking at it. Thanks again. Filipe. On Sun, Mar 28, 2010 at 3:35 PM, Friedrich Romstedt friedrichromst...@gmail.com wrote: 2010/3/28 Filipe Pires Alvarenga Fernandes ocef...@gmail.com: Hello list I've trying for a while a python only solution to remove white spaces that Basemap generate to keep the aspect ratio. I found these two threads that explain the issue better: I think maybe you can make use of the Agg Backend to achieve a Python-only solution to obtain a PIL Image from a figure without bypassing over the HDD: Furthemore, if this doesn't work, maybe you can use a StringIO as file, then seek() the StringIO and reread with PIL from the file-like StringIO, or something like that? # # Render the Figure to a PIL Image ... # # Prepare figure to be of pixel extent *shape* ... dpi = figure.dpi figure.set_size_inches(float(shape[0]) / dpi, float(shape[1]) / dpi) # Create the rendering Canvas ... # # We also convert the picture to an RGB string. canvas = matplotlib.backends.backend_agg.FigureCanvasAgg(figure) canvas.draw() image_string = canvas.tostring_rgb() # Create a PIL Image from RGB string ... image = Image.fromstring(RGB, shape, image_string) # Now do whatever you want with the Image. Friedrich #!/usr/bin/env python # -*- coding: utf-8 -*- # blueearth-map.py # update brazillian states database, this one is too old import sys import os import basemap and pylab try: from mpl_toolkits.basemap import Basemap except ImportError: print Basemap not found. try: import matplotlib matplotlib.use('Agg') from pylab import * except ImportError: print Matplotlib not found. # parse args (ugly!) if len(sys.argv) == 6: lonmin = float(sys.argv[2]) lonmax = float(sys.argv[3]) latmin = float(sys.argv[4]) latmax = float(sys.argv[5]) lonlat = np.loadtxt(sys.argv[1]) lonpt = lonlat[:,0] latpt = lonlat[:,1] elif len(sys.argv) == 5: lonmin = float(sys.argv[1]) lonmax = float(sys.argv[2]) latmin = float(sys.argv[3]) latmax = float(sys.argv[4]) else: sys.exit(\nMust provide at least 4 arguments!!! A 2 column file with longitue and latitute of the points (optional) and the lon lat limits for the map. e.g.: blueearth-map lonlat.dat -87.5 -22.5 -59.5 14.5\n) m = Basemap( projection = 'merc', llcrnrlat = latmin, urcrnrlat = latmax, llcrnrlon = lonmin, urcrnrlon = lonmax, resolution = 'c' ) # crude coastlines resolution create figure and associate axes with Basemap fig = figure() ax = fig.add_subplot(111) m.ax = ax m.drawstates() m.drawcountries(linewidth=1.2) m.bluemarble() add a non bluearth alternative #m.drawcoastlines() #m.drawlsmask(land_color='grey',ocean_color='None', lakes=True) plot points try: lonpt xc,yc = m(lonpt,latpt) #m.plot(xc,yc,'ro', alpha = 0.5, markersize=2) m.plot(xc,yc,'ro', markersize=2) if lonpt.min() lonmin: print \n some points are out of bounds (min longitude) \n if lonpt.max() lonmax: print \n some points are out of bounds (max longitude) \n if latpt.min() latmin: print \n some points are out of bounds (min latitude) \n if latpt.max() latmax: print \n some points are out of bounds (max latitude) \n except: print \n No lon/lat file to plot \n savefig('blueearthmap.png', dpi=300) trim method 1 from PIL import Image im = Image.open(blueearthmap.png) def trim(im, border): from PIL import ImageChops bg = Image.new(im.mode, im.size, border) diff = ImageChops.difference(im, bg) bbox = diff.getbbox() if bbox: return im.crop(bbox) else: # found no content raise ValueError(cannot trim; image was empty) im2=trim(im,'white') show() # allow user to save to a different filename and format, but it won't be cropped! im2.save('blueearthmap.png',format='png') #- trim method 2 #os.system('convert -trim blueearthmap.png blueearthmap.png') #show() #- trim method 3 #Render the Figure to a PIL Image # Prepare figure to be of pixel extent *shape* dpi = fig.dpi fig.set_size_inches(float(shape[0]) / dpi, float(shape[1]) / dpi) # Create the rendering Canvas. We also convert the picture to an RGB
[Matplotlib-users] Basemap white space
Hello list I've trying for a while a python only solution to remove white spaces that Basemap generate to keep the aspect ratio. I found these two threads that explain the issue better: http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg14430.html http://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg14262.html In the past I relied on ImageMagick's convert command with the -trim white option for the job. However, just recently I came across with this other list and a PIL solution: http://mail.python.org/pipermail/image-sig/2008-July/005092.html Here is how I'm doing: savefig('mapa.png', dpi=300) from PIL import Image im = Image.open(mapa.png) def trim(im, border): from PIL import ImageChops bg = Image.new(im.mode, im.size, border) diff = ImageChops.difference(im, bg) bbox = diff.getbbox() if bbox: return im.crop(bbox) else: # found no content raise ValueError(cannot trim; image was empty) im2=trim(im,'white') im2.show() This works and the aspect ratio is preserved, but as you can see, it is not a very smart implementation. I save and then reload it again... any suggestions to improve this are welcome. Also, I have not tried this on figures with labels and annotations. Thanks for any input. * Filipe Pires Alvarenga Fernandes University of Massachusetts Dartmouth 200 Mill Road - Fairhaven, MA Tel: (508) 910-6381 Email: falvarengafernan...@umassd.edu ocef...@yahoo.com.br ocef...@gmail.com http://ocefpaf.tiddlyspot.com/ * -- Download Intel#174; Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] DateFormatter + Latex issue
Thanks Ernest, I had no idea that the DateFormatter was going to be treated as latex as well. However, escaping the \ with another \ did not worked. I tried: majorF = DateFormatter(\\n \\n %b) How should I escape the \n ? majorF = DateFormatter(\n \n %b) # problem ^^ ^^ A common mistake. You forgot to escape the \ characters. Bye. Ernest -- SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] DateFormatter + Latex issue
\\ works for titles and label, but not for DateFormatter, but \vspace did the trick! Thanks again for the help. ps: I'm new to python, but maybe there is a way to mix Latex and unicode? as latex as well. Yes, all strings are processed by LaTeX. However, escaping the \ with another \ did not worked. I tried: majorF = DateFormatter(\\n \\n %b) How should I escape the \n ? In theory, \\n \\n %b or r\n \n %b, however only the former seems to work in my computer. There's another problem: \n is not a valid LaTeX command. I tried with \\ and with \newline but neither appear to work. \vspace{10pts} does insert whitespace, however I am not sure if it's the proper way of doing it... Bye. majorF = DateFormatter(\n \n %b) # problem ^^ ^^ A common mistake. You forgot to escape the \ characters. Bye. Ernest Thanks Ernest, I had no idea that the DateFormatter was going to be treated -- SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] DateFormatter + Latex issue
JJ: Wonderful, simple and much less messy and Latex+unicode. Although, now I'm fascinated by the Latex possibilities! Ernest: I haven't notice the s before when using pts, but what is really strange is that pt does not work! Thank you all again, Filipe -- SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] DateFormatter + Latex issue
Hello list, If I use DateFormatter with latex and lines breaks like this DateFormatter(\n \n %b) I get an latex error: http://pastebin.com/m5b186ded Although, if I do not use the line breaks, DateFormatter(%b) The problem disappears. Below is a script that reproduces what I'm talking about: #Example: from pylabimport * from matplotlib import rcParams rcParams['text.usetex'] = True fig = figure() ax = fig.add_subplot(111) fig.subplots_adjust(bottom=0.2) t = arange(100,110,.1) u = sin(t) v = cos(t) quiver([t],[[0]*len(t)],u,v) major = DayLocator([10,04]) minor = DayLocator() majorF = DateFormatter(\n \n %b) # problem #majorF = DateFormatter(%b) # no problem minorF = DateFormatter('%d') ax.xaxis.set_major_locator(major) ax.xaxis.set_minor_locator(minor) ax.xaxis.set_major_formatter(majorF) ax.xaxis.set_minor_formatter(minorF) gca().xaxis_date() title(r$\alpha \beta \gamma \delta$) show() I'm using the latest svn version with qt4 as backend. Thanks, Filipe -- SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Placing a marker at specific places where lines join?
Dear Wayne Watson, As yourself I'm also new to matplotlib (and python) and I know that learning such a library can be overwhelming at first. Still, this community/mailist has answered all my newbie questions, even when they were clearly in the manual or have already been answered in previous posts. All this free of charge! We actually have the privilege of having the developers inhabiting the user list! This is not true in many users-lists that I dwell. You mentioned matlab in your message as the way to go. If your project has a budget for license and support, maybe that is indeed the way to go. Otherwise, if you come from a matlab background as myself, you might be interested in these two links: http://www.scipy.org/NumPy_for_Matlab_Users and http://mathesaurus.sourceforge.net/matlab-numpy.html They are not matplotlib references, but help to understand how things are done before you fire-a-plot. Hope that help you in your learning adventure. Also, you might find useful to read this: http://www.freebsd.org/doc/en/articles/mailing-list-faq/etiquette.html It is BSD related, but most is true for any maillist. Best, Filipe On Sat, Feb 13, 2010 at 9:03 PM, Wayne Watson sierra_mtnv...@sbcglobal.netwrote: Suppose I plot a line from (0,0) to (1,1.5) to (2,2). Now I want to mark (1,1.5) with a green circle. How is that done? -- Crime is way down. War is declining. And that's far from the good news. -- Steven Pinker (and other sources) Why is this true, but yet the media says otherwise? The media knows very well how to manipulate us (see limbic, emotion, $$). -- WTW -- SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] x,y ticklabel too close
Thanks for all the suggestions, Spines did the trick. JJ, I would like to be able to contribute more, but my python knowledge is very limited and I'm still a very Matlab oriented person. Anyways, maybe people here might be interested in my recent adventure trying to learn python. I converted the CSIRO seawater library from matlab to python. http://www.cmar.csiro.au/datacentre/ext_docs/seawater.htm I know that this is specific for oceanographers, but I saw some of us in this list. Thanks again, this list helped my a lot. On Thu, Feb 11, 2010 at 12:40 PM, Filipe Pires Alvarenga Fernandes ocef...@gmail.com wrote: Hello list, For the following plotI using a large font for the tick-label that causes the first x,y tick-labels to overlap http://yfrog.com/5zimageykp for now I'm padding spaces to fix the plot, like this: newtick = [-10 , -5, 0 , 5 , 10 ] pos =[-10, -5, 0, 5, 10] yticks(pos, newtick) However I was wondering if there is any automatic way to avoid or fix this overlap. Thanks, Filipe -- SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] x,y ticklabel too close
Hello list, For the following plotI using a large font for the tick-label that causes the first x,y tick-labels to overlap http://yfrog.com/5zimageykp for now I'm padding spaces to fix the plot, like this: newtick = [-10 , -5, 0 , 5 , 10 ] pos =[-10, -5, 0, 5, 10] yticks(pos, newtick) However I was wondering if there is any automatic way to avoid or fix this overlap. Thanks, Filipe -- SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] quiver + dates
Hello again, I managed to produce a nice stickplot, thanks to all again. Here is the script in case anyone is interested. http://dl.dropbox.com/u/4411725/plt-surf-flx.html Best, Filipe On Mon, Feb 8, 2010 at 9:57 AM, Filipe Pires Alvarenga Fernandes ocef...@gmail.com wrote: Thanks, that worked perfectly. Best, Filipe On Mon, Feb 8, 2010 at 8:39 AM, Stephane Raynaud stephane.rayn...@gmail.com wrote: Hi Filipe, you can fist use the quiver() function in the classic way for stick plots, then use gca().xaxis_date(). Here is a simple example : import pylab as P # t may be generated using date2num() t = P.arange(100,110,.1) u = P.sin(t) v = P.cos(t) P.quiver([t],[[0]*len(t)],u,v) P.gca().xaxis_date() P.show() On Sun, Feb 7, 2010 at 6:11 PM, Filipe Pires Alvarenga Fernandes ocef...@gmail.com wrote: Hello list, I'm trying to create a stick-plot figure using the quiver function from matplotlib. However, I'm failing miserably to plot dates in the x-axis. Has anyone done this before? Also, is there an effort to create a stickplot function? Thanks, Filipe * Filipe Pires Alvarenga Fernandes University of Massachusetts Dartmouth 200 Mill Road - Fairhaven, MA Tel: (508) 910-6381 Email: falvarengafernan...@umassd.edu ocef...@yahoo.com.br ocef...@gmail.com http://ocefpaf.tiddlyspot.com/ * -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Stephane Raynaud -- SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] quiver + dates
Thanks, that worked perfectly. Best, Filipe On Mon, Feb 8, 2010 at 8:39 AM, Stephane Raynaud stephane.rayn...@gmail.com wrote: Hi Filipe, you can fist use the quiver() function in the classic way for stick plots, then use gca().xaxis_date(). Here is a simple example : import pylab as P # t may be generated using date2num() t = P.arange(100,110,.1) u = P.sin(t) v = P.cos(t) P.quiver([t],[[0]*len(t)],u,v) P.gca().xaxis_date() P.show() On Sun, Feb 7, 2010 at 6:11 PM, Filipe Pires Alvarenga Fernandes ocef...@gmail.com wrote: Hello list, I'm trying to create a stick-plot figure using the quiver function from matplotlib. However, I'm failing miserably to plot dates in the x-axis. Has anyone done this before? Also, is there an effort to create a stickplot function? Thanks, Filipe * Filipe Pires Alvarenga Fernandes University of Massachusetts Dartmouth 200 Mill Road - Fairhaven, MA Tel: (508) 910-6381 Email: falvarengafernan...@umassd.edu ocef...@yahoo.com.br ocef...@gmail.com http://ocefpaf.tiddlyspot.com/ * -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Stephane Raynaud -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] quiver + dates
Hello list, I'm trying to create a stick-plot figure using the quiver function from matplotlib. However, I'm failing miserably to plot dates in the x-axis. Has anyone done this before? Also, is there an effort to create a stickplot function? Thanks, Filipe * Filipe Pires Alvarenga Fernandes University of Massachusetts Dartmouth 200 Mill Road - Fairhaven, MA Tel: (508) 910-6381 Email: falvarengafernan...@umassd.edu ocef...@yahoo.com.br ocef...@gmail.com http://ocefpaf.tiddlyspot.com/ * -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] accented characters
Does matplotlib support accented characters without the TeX mathtext? Thanks. * Filipe Pires Alvarenga Fernandes University of Massachusetts Dartmouth 200 Mill Road - Fairhaven, MA Tel: (508) 910-6381 Email: falvarengafernan...@umassd.edu ocef...@yahoo.com.br ocef...@gmail.com http://ocefpaf.tiddlyspot.com/ * -- The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Plots dates on contour plot
Dear matplotlib users, I've been successful to plot 2-D lines with dates in the x-axis directly like: plot(time,dens[1,:]) Where times starts at 1998-01-11 01:00:00 and ends at 1998-02-06 08:00:00 (633 elements). and dens has 10 elements. Now I'm trying to make a contour plot like: CS = contourf(tempo, depth, dens) But I cannot make the dates appear, the plot shows only the date number. Thanks for any help, Filipe ps: matplotlib version: 0.99.1.1 backend: Qt4Agg llinux Opensuse 11.2 * Filipe Pires Alvarenga Fernandes Email: falvarengafernan...@umassd.edu ocef...@gmail.com http://ocefpaf.tiddlyspot.com/ * -- Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users