Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Rightclick on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: Benjamin Root <ben.root@ou...>  20100615 23:09:06
Attachments:
Message as HTML

Stephane, First off, you probably do not want to use a surface plot. Rather, pcolor might be more appropriate. In addition, if you can take the azimuthrange coordinates and convert that into xy coordinates, you can then plot a pcolor using just that. The code would look something like so (assuming some function polar2xy exists): # azimuth, r, vals, x, and y are all the same shape x, y = polar2xy(azimuth, r) plt.pcolor(x, y, vals) plt.show() Once that is working sufficiently, then you will have to modify the code a bit to specify the colormap. I hope that gets you started. Ben Root On Tue, Jun 15, 2010 at 10:17 AM, Stephane GONAUER < stephane.gonauer@...> wrote: > Hi, > > > > After reading documentations and the matplotlib example I haven’t found a > way to graph the plot I want. > > > > I am trying to display a radar video (one turn of the antenna at a time). > As such I need to plot a polar surface in 2D with a colormap indicating the > video intensity. > > > > > > My data input is simply a file where intensity are logged along rho and > theta > > > > The nearest example I found in the documentation is the 3dsurface plot but > I need to have it in 2D > > Can you provide me with some idea/pointers ? > > > > Has it been already tried ? > > > > > > > > Best Regards, > > Stéphane > > >  > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeekpromo > _______________________________________________ > Matplotlibusers mailing list > Matplotlibusers@... > https://lists.sourceforge.net/lists/listinfo/matplotlibusers > > 
From: Michael Droettboom <mdroe@st...>  20100616 14:25:18
Attachments:
Message as HTML

pcolor runs directly on polar plots just fine. No need to convert polar to cartesian outside of matplotlib. #!/usr/bin/env python from pylab import * import numpy as np # Sampling 60 points in both dimensions T = linspace(0, np.pi * 2, 60) R = linspace(0, 1.0, 60) Z = rand(60,60) # Create a polar axes ax = subplot(111, projection='polar') # pcolor plot onto it c = ax.pcolor(T, R, Z) title('default: no edges') show() Mike On 06/15/2010 07:08 PM, Benjamin Root wrote: > Stephane, > > First off, you probably do not want to use a surface plot. Rather, > pcolor might be more appropriate. > > In addition, if you can take the azimuthrange coordinates and convert > that into xy coordinates, you can then plot a pcolor using just > that. The code would look something like so (assuming some function > polar2xy exists): > > # azimuth, r, vals, x, and y are all the same shape > x, y = polar2xy(azimuth, r) > plt.pcolor(x, y, vals) > plt.show() > > Once that is working sufficiently, then you will have to modify the > code a bit to specify the colormap. > > I hope that gets you started. > > Ben Root > > > On Tue, Jun 15, 2010 at 10:17 AM, Stephane GONAUER > <stephane.gonauer@... <mailto:stephane.gonauer@...>> > wrote: > > Hi, > > After reading documentations and the matplotlib example I haven’t > found a way to graph the plot I want. > > I am trying to display a radar video (one turn of the antenna at a > time). As such I need to plot a polar surface in 2D with a > colormap indicating the video intensity. > > My data input is simply a file where intensity are logged along > rho and theta > > The nearest example I found in the documentation is the 3dsurface > plot but I need to have it in 2D > > Can you provide me with some idea/pointers ? > > Has it been already tried ? > > Best Regards, > > Stéphane > > >  > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeekpromo > _______________________________________________ > Matplotlibusers mailing list > Matplotlibusers@... > <mailto:Matplotlibusers@...> > https://lists.sourceforge.net/lists/listinfo/matplotlibusers > > > >  > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeekpromo > > > _______________________________________________ > Matplotlibusers mailing list > Matplotlibusers@... > https://lists.sourceforge.net/lists/listinfo/matplotlibusers >  Michael Droettboom Science Software Branch Space Telescope Science Institute Baltimore, Maryland, USA 
From: Friedrich Romstedt <friedrichromstedt@gm...>  20100618 12:43:54

2010/6/16 Michael Droettboom <mdroe@...>: > pcolor runs directly on polar plots just fine. No need to convert polar to > cartesian outside of matplotlib. It's true, but at the expense of pretty much time, since the arcs must be rendered properly. If your data is dense enough in r and phi, a handmade conversion would probably gain much speedup. Of course you loose then also the nice polar diagram axes ... I tried this once in polar with pixeldense data (in a 400x400 px figure) and it takes really forever. I don't know if the output of the fast versions of pcolor is properly rendered in polar axes? Friedrich 
Sign up for the SourceForge newsletter:
No, thanks