Re: [Matplotlib-users] How to draw a specific country by basemap?

2011-01-27 Thread Eric Liang
On 01/27/2011 01:38 AM, Thomas Lecocq wrote: Hi, An easy way is to use the data from http://www.gadm.org/ and to plot it with m.readshapefile() Thank you very much. The GDAM database is great. BTW, would you like to give some suggestions about how to color the map, i.e., highlight a specific

Re: [Matplotlib-users] How to draw a specific country by basemap?

2011-01-27 Thread Thomas Lecocq
Hi, that would do: data = m.readshapefile(r'borders\ita_adm1','itaborder',linewidth=0.5) italy = data[4] print dir(italy) italy.set_facecolors('red') italy.set_alpha(0.5) I think at some point youll meet the limitations of the method, you might need to use another shapefile-reading module

Re: [Matplotlib-users] How to draw a specific country by basemap?

2011-01-27 Thread Thomas Lecocq
Hi, Adding some extra work in the readshapefile method in your code allows you to play with the region names etc,... I've just made a new tutorial script to show this : http://www.geophysique.be/2011/01/27/matplotlib-basemap-tutorial-07-shapefiles-unleached/ Thom

[Matplotlib-users] Extending readshapefile

2011-01-27 Thread Thomas Lecocq
Hi all, I would like to contribute to a better readshapefile method, who should I contact / where should I commit ? First improvement and partial solution : * returning a tuple of linecollections per record, with its name and other properties. Cheers, Thomas ps : example

[Matplotlib-users] pyplot: Extract contourset without plotting

2011-01-27 Thread Daniel Fulger
Dear all, contourset = pyplot.contour(..) calculates the contourset but also grabs whatever figure is currently active *somewhere* in the entire code and whichever scope it was created. The contours are plotted into it. While I could possibly live with that, I would really like to suppress

Re: [Matplotlib-users] pyplot: Extract contourset without plotting

2011-01-27 Thread Paul Ivanov
Daniel Fulger, on 2011-01-27 18:16, wrote: Dear all, contourset = pyplot.contour(..) calculates the contourset but also grabs whatever figure is currently active *somewhere* in the entire code and whichever scope it was created. The contours are plotted into it. While I could

Re: [Matplotlib-users] too many values to unpack with a bar chart

2011-01-27 Thread C M
Hi Paul, The reason you were getting that error is because unless you specify otherwise, ax.bar will make the bottom of the bars at 0 - which isn't an allowed date, hence the error. Change your bar line to this (I also added align='center', but you can remove it if you want): Aha, OK that

Re: [Matplotlib-users] pyplot: Extract contourset without plotting

2011-01-27 Thread Benjamin Root
On Thursday, January 27, 2011, Paul Ivanov pivanov...@gmail.com wrote: Daniel Fulger, on 2011-01-27 18:16,  wrote: Dear all, contourset = pyplot.contour(..) calculates the contourset but also grabs whatever figure is currently active *somewhere* in the entire code and whichever scope it

Re: [Matplotlib-users] pyplot: Extract contourset without plotting

2011-01-27 Thread Daniel Fulger
Dear all, contourset = pyplot.contour(..) calculates the contourset but also grabs whatever figure is currently active *somewhere* in the entire code and whichever scope it was created. The contours are plotted into it. While I could possibly live with that, I would really like to

Re: [Matplotlib-users] too many values to unpack with a bar chart

2011-01-27 Thread Paul Ivanov
C M, on 2011-01-27 13:56, wrote: bars = self.subplot.bar(self.final_dates, top-bot, bottom=bot, align='center') I get the error: TypeError: unsupported operand type(s) for -: 'list' and 'list' Because I am trying to subtract the bots list from the tops list. In the example code I gave,

Re: [Matplotlib-users] pyplot: Extract contourset without plotting

2011-01-27 Thread Eric Firing
On 01/27/2011 09:21 AM, Daniel Fulger wrote: Dear all, contourset = pyplot.contour(..) calculates the contourset but also grabs whatever figure is currently active *somewhere* in the entire code and whichever scope it was created. The contours are plotted into it. While I could possibly

Re: [Matplotlib-users] pyplot: Extract contourset without plotting

2011-01-27 Thread Paul Ivanov
Benjamin Root, on 2011-01-27 13:04, wrote: I believe he would rather call the core function that contour uses to do the heavy lifting. This was something that one can do in matlab, btw. I don't have access to the source right now. What does contour call to perform this calculation?

Re: [Matplotlib-users] pyplot: Extract contourset without plotting

2011-01-27 Thread Ian Thomas
Daniel, Following on from Eric's comments, attached is the simplest example I could come up with to do what you want. For non-filled contours, the 'segs' (last few lines of the file) should be fairly self-explanatory, and this is hopefully what you want. If you are after filled contours, you

Re: [Matplotlib-users] too many values to unpack with a bar chart

2011-01-27 Thread C M
just make a numpy array out of your two lists, and you'll be able to subtract one from the other. import numpy as np top = np.array(top) bot = np.array(bot) Thank you, Paul. That worked and I'm now able to display bar charts. I appreciate it. Best, Che

[Matplotlib-users] 3D Data to 2d Plots

2011-01-27 Thread Philipp A.
Hi list, I want to visualize Plots over time. This describes the data: [image: 3dplot.png] a) and b) are single scans, the cutting at the red bars is no problem. c) illustrates how they are done over time. d) is what I want. I think this

Re: [Matplotlib-users] Extending readshapefile

2011-01-27 Thread Jeff Whitaker
On 1/27/11 6:35 AM, Thomas Lecocq wrote: Hi all, I would like to contribute to a better readshapefile method, who should I contact / where should I commit ? First improvement and partial solution : * returning a tuple of linecollections per record, with its name and other properties.

Re: [Matplotlib-users] 3D Data to 2d Plots

2011-01-27 Thread Mike Alger
Philip, A few questions before I give one possible solution, Does this plot need to be updated in real time ? or is this plot to be done in post processing? if you can do the plots with post processing you should be able to use pcolor function to do your tasks