Re: [Matplotlib-users] windrose
Thank You Scott, I mistook the values I assumed .1 to .8 as the total x size and expected half of it should provide me 2 half boxes. thanks a lot for clarification. with best regards, Sudheer *** Sudheer Joseph Indian National Centre for Ocean Information Services Ministry of Earth Sciences, Govt. of India POST BOX NO: 21, IDA Jeedeemetla P.O. Via Pragathi Nagar,Kukatpally, Hyderabad; Pin:5000 55 Tel:+91-40-23886047(O),Fax:+91-40-23895011(O), Tel:+91-40-23044600(R),Tel:+91-40-9440832534(Mobile) E-mail:sjo.in...@gmail.com;sudheer.jos...@yahoo.com Web- http://oppamthadathil.tripod.com *** - Original Message - > From: Scott Sinclair > To: "matplotlib-users@lists.sourceforge.net" > > Cc: > Sent: Friday, 5 April 2013 6:36 PM > Subject: Re: [Matplotlib-users] windrose > > On 5 April 2013 03:54, Sudheer Joseph wrote: >> Some how I am not getting the trick of the >> rect = [0.1, 0.1, 0.8, 0.8] >> >> I tried >> rect1= [0.1,0.1,.4,.4] >> and rect2=[.4,.4,.8,.8] >> but did not work > > You don't say exactly what you did, and how it didn't work... > > If you read > http://matplotlib.org/api/figure_api.html?highlight=add_axes#matplotlib.figure.Figure.add_axes > it says "Add an axes at position rect [left, bottom, width, > height]...". So you need to specify sensible values in rect1 and > rect2. > > The following works fine for me: > > import matplotlib.pyplot as plt > fig = plt.figure() > rect1 = [0.1, 0.1, 0.4, 0.4] > rect2 = [0.55, 0.1, 0.4, 0.4] > ax1 = fig.add_axes(rect1) > ax2 = fig.add_axes(rect2) > ax1.plot(range(3)) > ax2.plot(range(4, 8)) > plt.show() > > So I would expect that you can adapt your original code to something > like the following (untested): > > from windrose import WindroseAxes > from matplotlib import pyplot as plt > from numpy.random import random > > def new_axes(fig, rect): > ax = WindroseAxes(fig, rect, axisbg='w') > fig.add_axes(ax) > return ax > > def set_legend(ax): > l = ax.legend(axespad=-0.10) > plt.setp(l.get_texts(), fontsize=8) > > #Create wind speed and direction variables > ws = random(500)*6 > wd = random(500)*360 > ws1 = random(500)*6 > wd1 = random(500)*360 > > rect1 = [0.1, 0.1, 0.4, 0.4] > rect2 = [0.55, 0.1, 0.4, 0.4] > > fig = plt.figure(figsize=(8, 8), dpi=80, facecolor='w', > edgecolor='w') > > ax1 = new_axes(fig, rect1) > ax2 = new_axes(fig, rect2) > > #windrose like a stacked histogram with normed (displayed in percent) results > ax1.bar(wd, ws, normed=True, opening=0.8, edgecolor='white') > set_legend(ax1) > > #windrose like a stacked histogram with normed (displayed in percent) results > ax2.bar(wd1, ws1, normed=True, opening=0.8, edgecolor='white') > set_legend(ax2) > > plt.show() > > Cheers, > Scott > > -- > Minimize network downtime and maximize team effectiveness. > Reduce network management and security costs.Learn how to hire > the most talented Cisco Certified professionals. Visit the > Employer Resources Portal > http://www.cisco.com/web/learning/employer_resources/index.html > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] windrose
On 5 April 2013 03:54, Sudheer Joseph wrote: > Some how I am not getting the trick of the > rect = [0.1, 0.1, 0.8, 0.8] > > I tried > rect1= [0.1,0.1,.4,.4] > and rect2=[.4,.4,.8,.8] > but did not work You don't say exactly what you did, and how it didn't work... If you read http://matplotlib.org/api/figure_api.html?highlight=add_axes#matplotlib.figure.Figure.add_axes it says "Add an axes at position rect [left, bottom, width, height]...". So you need to specify sensible values in rect1 and rect2. The following works fine for me: import matplotlib.pyplot as plt fig = plt.figure() rect1 = [0.1, 0.1, 0.4, 0.4] rect2 = [0.55, 0.1, 0.4, 0.4] ax1 = fig.add_axes(rect1) ax2 = fig.add_axes(rect2) ax1.plot(range(3)) ax2.plot(range(4, 8)) plt.show() So I would expect that you can adapt your original code to something like the following (untested): from windrose import WindroseAxes from matplotlib import pyplot as plt from numpy.random import random def new_axes(fig, rect): ax = WindroseAxes(fig, rect, axisbg='w') fig.add_axes(ax) return ax def set_legend(ax): l = ax.legend(axespad=-0.10) plt.setp(l.get_texts(), fontsize=8) #Create wind speed and direction variables ws = random(500)*6 wd = random(500)*360 ws1 = random(500)*6 wd1 = random(500)*360 rect1 = [0.1, 0.1, 0.4, 0.4] rect2 = [0.55, 0.1, 0.4, 0.4] fig = plt.figure(figsize=(8, 8), dpi=80, facecolor='w', edgecolor='w') ax1 = new_axes(fig, rect1) ax2 = new_axes(fig, rect2) #windrose like a stacked histogram with normed (displayed in percent) results ax1.bar(wd, ws, normed=True, opening=0.8, edgecolor='white') set_legend(ax1) #windrose like a stacked histogram with normed (displayed in percent) results ax2.bar(wd1, ws1, normed=True, opening=0.8, edgecolor='white') set_legend(ax2) plt.show() Cheers, Scott -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] windrose
Thank you Scott, Some how I am not getting the trick of the rect = [0.1, 0.1, 0.8, 0.8] I tried rect1= [0.1,0.1,.4,.4] and rect2=[.4,.4,.8,.8] but did not work Sudheer *** Sudheer Joseph Indian National Centre for Ocean Information Services Ministry of Earth Sciences, Govt. of India POST BOX NO: 21, IDA Jeedeemetla P.O. Via Pragathi Nagar,Kukatpally, Hyderabad; Pin:5000 55 Tel:+91-40-23886047(O),Fax:+91-40-23895011(O), Tel:+91-40-23044600(R),Tel:+91-40-9440832534(Mobile) E-mail:sjo.in...@gmail.com;sudheer.jos...@yahoo.com Web- http://oppamthadathil.tripod.com *** - Original Message - > From: Scott Sinclair > To: "matplotlib-users@lists.sourceforge.net" > > Cc: > Sent: Thursday, 4 April 2013 12:37 PM > Subject: Re: [Matplotlib-users] windrose > > On 4 April 2013 06:45, Sudheer Joseph wrote: >> Below is a sample script I got from windrose pack. I would like > to place 2 windroses side by side > ... >> >> from windrose import WindroseAxes >> from matplotlib import pyplot as plt > ... >> def new_axes(): >> fig = plt.figure(figsize=(8, 8), dpi=80, facecolor='w', > edgecolor='w') >> rect = [0.1, 0.1, 0.8, 0.8] >> ax = WindroseAxes(fig, rect, axisbg='w') >> fig.add_axes(ax) >> return ax > > I'm not familiar with the windrose package, but it looks like the rect > parameter to WindroseAxes specifies the size of the generated axes in > figure co-ordinates (see > http://matplotlib.org/api/figure_api.html?highlight=add_axes#matplotlib.figure.Figure.add_axes). > You should be able to pass in a different list of co-ordinates for > each WindroseAxes to get side-by-side axes on the same figure... > > Cheers, > Scott > > -- > Minimize network downtime and maximize team effectiveness. > Reduce network management and security costs.Learn how to hire > the most talented Cisco Certified professionals. Visit the > Employer Resources Portal > http://www.cisco.com/web/learning/employer_resources/index.html > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] windrose
On 4 April 2013 06:45, Sudheer Joseph wrote: > Below is a sample script I got from windrose pack. I would like to > place 2 windroses side by side ... > > from windrose import WindroseAxes > from matplotlib import pyplot as plt ... > def new_axes(): > fig = plt.figure(figsize=(8, 8), dpi=80, facecolor='w', edgecolor='w') > rect = [0.1, 0.1, 0.8, 0.8] > ax = WindroseAxes(fig, rect, axisbg='w') > fig.add_axes(ax) > return ax I'm not familiar with the windrose package, but it looks like the rect parameter to WindroseAxes specifies the size of the generated axes in figure co-ordinates (see http://matplotlib.org/api/figure_api.html?highlight=add_axes#matplotlib.figure.Figure.add_axes). You should be able to pass in a different list of co-ordinates for each WindroseAxes to get side-by-side axes on the same figure... Cheers, Scott -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] windrose
Dear users, Below is a sample script I got from windrose pack. I would like to place 2 windroses side by side so that a comparison can be made. For example I have created additional variables ws1 wd1, and I would like that to be placed in the same row as a 1 row 2 column way. Any help in this regard will be great. (I tried subplot(221) subplot(222) but it do not work as the windrose uses new axis each time.) from windrose import WindroseAxes from matplotlib import pyplot as plt import matplotlib.cm as cm from numpy.random import random from numpy import arange #Create wind speed and direction variables ws = random(500)*6 wd = random(500)*360 ws1 = random(500)*6 wd1 = random(500)*360 def new_axes(): fig = plt.figure(figsize=(8, 8), dpi=80, facecolor='w', edgecolor='w') rect = [0.1, 0.1, 0.8, 0.8] ax = WindroseAxes(fig, rect, axisbg='w') fig.add_axes(ax) return ax def set_legend(ax): l = ax.legend(axespad=-0.10) plt.setp(l.get_texts(), fontsize=8) #windrose like a stacked histogram with normed (displayed in percent) results ax = new_axes() ax.bar(wd, ws, normed=True, opening=0.8, edgecolor='white') set_legend(ax) #Another stacked histogram representation, not normed, with bins limits ##print ax._info plt.show() *** Sudheer Joseph Indian National Centre for Ocean Information Services Ministry of Earth Sciences, Govt. of India POST BOX NO: 21, IDA Jeedeemetla P.O. Via Pragathi Nagar,Kukatpally, Hyderabad; Pin:5000 55 Tel:+91-40-23886047(O),Fax:+91-40-23895011(O), Tel:+91-40-23044600(R),Tel:+91-40-9440832534(Mobile) E-mail:sjo.in...@gmail.com;sudheer.jos...@yahoo.com Web- http://oppamthadathil.tripod.com *** -- Minimize network downtime and maximize team effectiveness. Reduce network management and security costs.Learn how to hire the most talented Cisco Certified professionals. Visit the Employer Resources Portal http://www.cisco.com/web/learning/employer_resources/index.html ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] windrose
Thank you Paul, I think the font issue is the mischief of Yahoo. I think I should send mail in text mode rather than html then the issue will not be there I hope. The signature is in normal text mode I saved. Please revert back if my mail shows font issues again so that I can try some thing different. However when I see it in Yahoo there is no issues though.. with best regards, Sudheer *** Sudheer Joseph Indian National Centre for Ocean Information Services Ministry of Earth Sciences, Govt. of India POST BOX NO: 21, IDA Jeedeemetla P.O. Via Pragathi Nagar,Kukatpally, Hyderabad; Pin:5000 55 Tel:+91-40-23886047(O),Fax:+91-40-23895011(O), Tel:+91-40-23044600(R),Tel:+91-40-9440832534(Mobile) E-mail:sjo.in...@gmail.com;sudheer.jos...@yahoo.com Web- http://oppamthadathil.tripod.com *** > > From: Paul Hobson >To: Sudheer Joseph >Cc: "matplotlib-users@lists.sourceforge.net" > >Sent: Tuesday, 19 March 2013 11:30 PM >Subject: Re: [Matplotlib-users] windrose > > >On Tue, Mar 19, 2013 at 2:22 AM, Sudheer Joseph >wrote: > >Dear users, >> Attached is a windrose diagram created by using >>https://sourceforge.net/project/showfiles.php?group_id=239240&package_id=290902 >> . Can any one tell me if the numbers displayed in the attached plot is % of >>wind directions in each category? or are they represent some other numbers? >> >> >>http://3.bp.blogspot.com/_4ZlrnfU7IT8/TPxpftZGzfI/ADA/uq9cF3PTpR8/s1600/Wind_rose_plot.jpg >> > > >Sudheer, > > >That's correct. The total length of the bars is the percentage of time that >the wind is blowing *from* that direction. >See my implementation here: >https://github.com/phobson/python-metar/blob/master/metar/graphics.py#L135 > > >Side note, you're emails are consistently formatted pretty strangely and can >be difficult to read. Perhaps stick with the same font that is in your email >signature? > >-- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] windrose
Just a thought: Shouldn't the bars terminate with a arc rather then a straight line? What value should one reading this diagram look at? The one at the center of the "bar" or the "corners" these values can be quite different. Sent from my iPhone On Mar 19, 2013, at 8:00 PM, Paul Hobson wrote: > On Tue, Mar 19, 2013 at 2:22 AM, Sudheer Joseph > wrote: >> Dear users, >> Attached is a windrose diagram created by using >> https://sourceforge.net/project/showfiles.php?group_id=239240&package_id=290902 >> . Can any one tell me if the numbers displayed in the attached plot is % of >> wind directions in each category? or are they represent some other numbers? >> >> http://3.bp.blogspot.com/_4ZlrnfU7IT8/TPxpftZGzfI/ADA/uq9cF3PTpR8/s1600/Wind_rose_plot.jpg > > Sudheer, > > That's correct. The total length of the bars is the percentage of time that > the wind is blowing *from* that direction. > See my implementation here: > https://github.com/phobson/python-metar/blob/master/metar/graphics.py#L135 > > Side note, you're emails are consistently formatted pretty strangely and can > be difficult to read. Perhaps stick with the same font that is in your email > signature? > -- > Everyone hates slow websites. So do we. > Make your web apps faster with AppDynamics > Download AppDynamics Lite for free today: > http://p.sf.net/sfu/appdyn_d2d_mar > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] windrose
On Tue, Mar 19, 2013 at 2:22 AM, Sudheer Joseph wrote: > Dear users, > Attached is a windrose diagram created by using > https://sourceforge.net/project/showfiles.php?group_id=239240&package_id=290902. > Can any one tell me if the numbers displayed in the attached plot is % of > wind directions in each category? or are they represent some other numbers? > > > http://3.bp.blogspot.com/_4ZlrnfU7IT8/TPxpftZGzfI/ADA/uq9cF3PTpR8/s1600/Wind_rose_plot.jpg > > Sudheer, That's correct. The total length of the bars is the percentage of time that the wind is blowing *from* that direction. See my implementation here: https://github.com/phobson/python-metar/blob/master/metar/graphics.py#L135 Side note, you're emails are consistently formatted pretty strangely and can be difficult to read. Perhaps stick with the same font that is in your email signature? -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_mar___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] windrose OO
Hi all, with few free hours, I have modified the windrose file to be O.O. compliant with the 0.98 matplotlib branch and normally bug free. The next posts will be on sourceforge : https://sourceforge.net/project/showfiles.php?group_id=239240&package_id=290902 and to see it in detail, here is the entry on blogspot: http://youarealegend.blogspot.com/2008/09/windrose.html All suggestion welcome (even to correct my bad english ;-) ) Thanks to the best python plotting library and the matplotlib team! -- Lionel Roubeyrie - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] windrose OO
Hi, sorry for the latency, holidays just finished :-( Find with this message a modified version of windrose_oo, but I'm not very familiar with the new projections facilities, and then the code is buggy : ## Traceback (most recent call last): File "windrose_oo.py", line 464, in ax = WindroseAxes(fig, rect, axisbg='w') File "windrose_oo.py", line 33, in __init__ PolarAxes.__init__(self, *args, **kwargs) File "/usr/lib/python2.5/site-packages/matplotlib/projections/polar.py", line 171, in __init__ Axes.__init__(self, *args, **kwargs) File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line 529, in __init__ self.cla() File "windrose_oo.py", line 47, in cla PolarAxes.cla(self) File "/usr/lib/python2.5/site-packages/matplotlib/projections/polar.py", line 177, in cla Axes.cla(self) File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line 771, in cla self.xaxis.cla() AttributeError: 'NoneType' object has no attribute 'cla' # I don't understand why this problem occurs, if someone can the mistake, I'll appreciate :-) Thanks Christopher Barker a écrit : Lionel Roubeyrie wrote: find with this message a modified version of windrose to be OO compliant. Lionel, I've had this message of yours (from March), and finally had a chance to use it. Unfortunately, it seems to use the old Transforms mechanism, so won't work with the latest MPL. have you ported it over yet? Can anyone else help out with a port? Thanks, -Chris -- Lionel Roubeyrie - [EMAIL PROTECTED] Chargé d'études et de maintenance LIMAIR - la Surveillance de l'Air en Limousin http://www.limair.asso.fr #!/usr/bin/env python # -*- coding: utf-8 -*- __version__ = '0.2' __author__ = 'Lionel Roubeyrie' __mail__ = '[EMAIL PROTECTED]' __license__ = 'matplotlib license' import matplotlib import matplotlib.cm as cm import numpy as N from matplotlib.patches import Rectangle, Polygon from matplotlib.ticker import ScalarFormatter, AutoLocator from matplotlib.text import Text, FontProperties from matplotlib.projections.polar import PolarAxes from matplotlib.cbook import popd, popall from numpy.lib.twodim_base import histogram2d class WindroseAxes(PolarAxes): """ Makes a windrose axes """ RESOLUTION = 100 def __init__(self, *args, **kwargs): """ See Axes base class for args and kwargs documentation """ PolarAxes.__init__(self, *args, **kwargs) self.set_aspect('equal', adjustable='box', anchor='C') self.radii_angle = 67.5 self.cla() def _init_axis(self): self.xaxis = None self.yaxis = None def cla(self): """ Clear the current axes """ PolarAxes.cla(self) self.theta_angles = N.arange(0, 360, 45) self.theta_labels = ['E', 'N-E', 'N', 'N-W', 'W', 'S-W', 'S', 'S-E'] self.set_thetagrids(angles=self.theta_angles, labels=self.theta_labels) self._info = {'dir' : list(), 'bins' : list(), 'table' : list()} self.patches_list = list() def _colors(self, cmap, n): ''' Returns a list of n colors based on the colormap cmap ''' return [cmap(i) for i in N.linspace(0.0, 1.0, n)] def set_radii_angle(self, **kwargs): """ Set the radii labels angle """ null = popd(kwargs, 'labels', None) angle = popd(kwargs, 'angle', None) if angle is None: angle = self.radii_angle self.radii_angle = angle radii = N.linspace(0.1, self.get_rmax(), 6) radii_labels = [ "%.1f" %r for r in radii ] radii_labels[0] = "" #Removing label 0 null = self.set_rgrids(radii=radii, labels=radii_labels, angle=self.radii_angle, **kwargs) def _update(self): self.regrid(self.get_rmax()) self.set_radii_angle(angle=self.radii_angle) def legend(self, loc='lower left', **kwargs): """ Sets the legend location and her properties. The location codes are 'best' : 0, 'upper right' : 1, 'upper left' : 2, 'lower left' : 3, 'lower right' : 4, 'right': 5, 'center left' : 6, 'center right' : 7, 'lower center' : 8, 'upper center' : 9, 'center' : 10, If none of these are suitable, loc can be a 2-tuple giving x,y in axes coords, ie, loc = (0, 1) is left top loc = (0.5, 0.5) is center, center and so on. The following kwargs are supported: isaxes=True # whether this is an axes legend prop = FontProperties(size='smaller') # the font property pad = 0.2 # the fractional whitespace inside the legend border shadow#
Re: [Matplotlib-users] windrose OO
On Mon, Aug 11, 2008 at 3:51 PM, Michael Droettboom <[EMAIL PROTECTED]> wrote: > Christopher Barker wrote: >> Is there a guide to translating code from the old to new Transforms >> structure? > Yes, in the API_CHANGES file, in the source distribution. (I'd link to > SVN, but it seems Sourceforge's SVN browser is down.) We keep a copy of this file at http://matplotlib.sf.net/API_CHANGES that is updated with every release See also http://matplotlib.sourceforge.net/MIGRATION.txt JDH - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] windrose OO
On Mon, Aug 11, 2008 at 3:51 PM, Michael Droettboom <[EMAIL PROTECTED]> wrote: > Christopher Barker wrote: >> Is there a guide to translating code from the old to new Transforms >> structure? > Yes, in the API_CHANGES file, in the source distribution. (I'd link to > SVN, but it seems Sourceforge's SVN browser is down.) We keep a copy of this file at http://matplotlib.sf.net/API_CHANGES that is updated with every release See also http://matplotlib.sourceforge.net/MIGRATION.txt JDH - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] windrose OO
Christopher Barker wrote: > Is there a guide to translating code from the old to new Transforms > structure? > Yes, in the API_CHANGES file, in the source distribution. (I'd link to SVN, but it seems Sourceforge's SVN browser is down.) Cheers, Mike - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] windrose OO
Christopher Barker wrote: > have you ported it over yet? Can anyone else help out with a port? Note: it looks pretty easy, if yu know what you are doing: from matplotlib.transforms import Interval, Value Then in the code, I inly see Interval and Value used here: self.rintv = Interval(Value(0), Value(1)) self.rintd = Interval(Value(0), Value(1)) Is there a guide to translating code from the old to new Transforms structure? -CHB -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [EMAIL PROTECTED] - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] windrose OO
Lionel Roubeyrie wrote: find with this message a modified version of windrose to be OO compliant. Lionel, I've had this message of yours (from March), and finally had a chance to use it. Unfortunately, it seems to use the old Transforms mechanism, so won't work with the latest MPL. have you ported it over yet? Can anyone else help out with a port? Thanks, -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R(206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception [EMAIL PROTECTED] windrose_oo.py Description: application/python - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] windrose OO
On Wed, 26 Mar 2008, Lionel Roubeyrie apparently wrote: > [Attachment: windrose_oo.py : APPLICATION/X-PYTHON, 28502 bytes] Thanks for the update. Cheers, Alan Isaac - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] windrose OO
Hi all, find with this message a modified version of windrose to be OO compliant. It uses inheritance from PolarAxes to create a WindroseAxes, with 4 methods (contour, contourf, bar and box). BTW it's now possible to control it like any other axes, with the limitation of subploting (subplot is to closer to simple axe and polaraxe). There's also a extra argument 'blowto' which reverse the plot (used in pollutantrose), and scipy is not required (just numpy). Hope someone find it usefull Cordialy -- Lionel Roubeyrie - [EMAIL PROTECTED] Chargé d'études et de maintenance LIMAIR - la Surveillance de l'Air en Limousin http://www.limair.asso.fr windrose_oo.py Description: application/python - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] windrose 0.5
Hi Derek, I forgot to mention: you can pass throught your problem by using a masked array instead of a simple array, and it should work fine, the 'default' parameter is here to fill missing value by -1.e20, then these directions will be dropped if your speed_classes not include that missing value (generally we compute on positives speeds). Le Jeudi 01 Février 2007 13:17, Derek Hohls a écrit : > Lionel > > I have encountered a problem with windrose. In some cases, one or more > of the > wind direction values are null [''] - the program then fails on line > 200: >values = select( [greater_equal( direction, wind_classes[i] > )],[speed], default=-1.e20 ) > Is it possible for you to upgrade the program to perform error > trapping > and simply skip (i.e. not process) any values that are null (and handle > the > exceptional case that all of them might, in fact, be null). > > Thanks! > Derek -- Lionel Roubeyrie - [EMAIL PROTECTED] LIMAIR http://www.limair.asso.fr - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] windrose 0.5
Lionel I have encountered a problem with windrose. In some cases, one or more of the wind direction values are null [''] - the program then fails on line 200: values = select( [greater_equal( direction, wind_classes[i] )],[speed], default=-1.e20 ) Is it possible for you to upgrade the program to perform error trapping and simply skip (i.e. not process) any values that are null (and handle the exceptional case that all of them might, in fact, be null). Thanks! Derek >>> Lionel Roubeyrie <[EMAIL PROTECTED]> 2006/10/18 05:57:55 PM >>> Hi Derek, happy to see you use it, here is windrose0.5 with some improvments :-) > * do not outline the colors in black; its hard to see smaller/shorter > lines Done > * the % labels need either to go along a vector NOT used to draw data, > or > be drawn last (on top of data); or a combination of both Now "%" is set with the external label. I don't find how to set labels (and grids) above patches, ax.set_axisbelow(False) doesn't work :-( But for the moment you can use labangle parameter to move the labels. > * the 0.0% label can probably be omitted from the centre > * drawing a title("") on the plot is still problematic (it overwrites > the "N" in some cases) 0.0 is not longer draw > * default background color should be white Hum, everybody can set it directly from matplotlibrc or creating an polar axis before. > * a legend title will *very* useful Waiting for polar axes legend improvments :-) > > And a question - is it possible to restrict the plot to a portion of > the area; > say to the left, with a "rectangle" of the space available to the > right; or > up to the top, with a "rectangle" of the space available to the > bottom. > Plots often have to annotated and its useful to have some working > space > to do this. Don't know if I really understand what you want, but why don't you use subplot to split your figures? > > Thanks for all the good work! > Derek >PS Does anyone else using this program get the strange "[" and "]" >signs around the data ranges in the legend - how can this be turned off? You're the first saying you use it :-) Maybe differents progs versions. I use: |datas|[42]>matplotlib.__version__ Out [42]:'0.87.5' |datas|[43]>scipy.__version__ Out [43]:'0.5.1' |datas|[44]>numpy.__version__ Out [44]:'1.0b5' Lionel -- Lionel Roubeyrie - [EMAIL PROTECTED] LIMAIR http://www.limair.asso.fr -- This message is subject to the CSIR's copyright, terms and conditions and e-mail legal notice. Views expressed herein do not necessarily represent the views of the CSIR. CSIR E-mail Legal Notice http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html CSIR Copyright, Terms and Conditions http://mail.csir.co.za/CSIR_Copyright.html For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR Legal Notice send a blank message with REQUEST LEGAL in the subject line to [EMAIL PROTECTED] This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] windrose 0.5
Hi Derek, yes you can, because you've got an axes instance: freq, axe= windrose.windplot( ... setp(axe.thetagridlabels,fontsize=16) #for directions setp(axe.rgridlabels,fontsize=10) #for values I want to change how windrose is called and controled, like all others matplotlib graphs. Maybe in 0.6. Le jeudi 26 octobre 2006 08:34, Derek Hohls a écrit : > Lionel > > Is it possible to change the font sizes on the > (a) direction labels (N, S, E, W) > (b) % values labelling the rings? > > Thanks > Derek -- Lionel Roubeyrie - [EMAIL PROTECTED] LIMAIR http://www.limair.asso.fr - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] windrose 0.5
Lionel Is it possible to change the font sizes on the (a) direction labels (N, S, E, W) (b) % values labelling the rings? Thanks Derek -- This message is subject to the CSIR's copyright, terms and conditions and e-mail legal notice. Views expressed herein do not necessarily represent the views of the CSIR. CSIR E-mail Legal Notice http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html CSIR Copyright, Terms and Conditions http://mail.csir.co.za/CSIR_Copyright.html For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR Legal Notice send a blank message with REQUEST LEGAL in the subject line to [EMAIL PROTECTED] This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] windrose 0.5
Stefan Here is short test program: from pylab import * import windrose figure(figsize=(8,8)) vVeloc = [ 0.2, 0.08, 0.2, 0.35, 0.09, 0.45, 0.5, 0.2, 0.33, 0.44, 0.22, 0.07 ] vDir = [ 65., 58., 59., 74., 231., 168., 183., 166., 214., 255., 60., 62.] freq,ax=windrose.windplot(vVeloc,vDir,counts=False,speed_classes=[0.0, 0.1,0.2,0.3,0.4],sectors=8,labangle=66,style='bar2') fig=ax.get_figure() for leg in fig.legends: setp(leg.get_texts(), fontsize=8) draw() show() The plot does "look better" as you add more data Derek >>> Stefan van der Walt <[EMAIL PROTECTED]> 2006/10/18 06:11:23 PM >>> On Wed, Oct 18, 2006 at 05:57:55PM +0200, Lionel Roubeyrie wrote: > Hi Derek, > happy to see you use it, here is windrose0.5 with some improvments :-) I'd like to see what the latest version does -- can you post a segment of code that demonstrates? Cheers Stéfan - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- This message is subject to the CSIR's copyright, terms and conditions and e-mail legal notice. Views expressed herein do not necessarily represent the views of the CSIR. CSIR E-mail Legal Notice http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html CSIR Copyright, Terms and Conditions http://mail.csir.co.za/CSIR_Copyright.html For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR Legal Notice send a blank message with REQUEST LEGAL in the subject line to [EMAIL PROTECTED] This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] windrose 0.5
On Wed, Oct 18, 2006 at 05:57:55PM +0200, Lionel Roubeyrie wrote: > Hi Derek, > happy to see you use it, here is windrose0.5 with some improvments :-) I'd like to see what the latest version does -- can you post a segment of code that demonstrates? Cheers Stéfan - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] windrose 0.5
Hi Derek, happy to see you use it, here is windrose0.5 with some improvments :-) > * do not outline the colors in black; its hard to see smaller/shorter > lines Done > * the % labels need either to go along a vector NOT used to draw data, > or > be drawn last (on top of data); or a combination of both Now "%" is set with the external label. I don't find how to set labels (and grids) above patches, ax.set_axisbelow(False) doesn't work :-( But for the moment you can use labangle parameter to move the labels. > * the 0.0% label can probably be omitted from the centre > * drawing a title("") on the plot is still problematic (it overwrites > the "N" in some cases) 0.0 is not longer draw > * default background color should be white Hum, everybody can set it directly from matplotlibrc or creating an polar axis before. > * a legend title will *very* useful Waiting for polar axes legend improvments :-) > > And a question - is it possible to restrict the plot to a portion of > the area; > say to the left, with a "rectangle" of the space available to the > right; or > up to the top, with a "rectangle" of the space available to the > bottom. > Plots often have to annotated and its useful to have some working > space > to do this. Don't know if I really understand what you want, but why don't you use subplot to split your figures? > > Thanks for all the good work! > Derek >PS Does anyone else using this program get the strange "[" and "]" >signs around the data ranges in the legend - how can this be turned off? You're the first saying you use it :-) Maybe differents progs versions. I use: |datas|[42]>matplotlib.__version__ Out [42]:'0.87.5' |datas|[43]>scipy.__version__ Out [43]:'0.5.1' |datas|[44]>numpy.__version__ Out [44]:'1.0b5' Lionel -- Lionel Roubeyrie - [EMAIL PROTECTED] LIMAIR http://www.limair.asso.fr windrose.py Description: application/python - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] windrose 0.4
Lionel Improving with each version! A few small tweaks: * do not outline the colors in black; its hard to see smaller/shorter lines * the % labels need either to go along a vector NOT used to draw data, or be drawn last (on top of data); or a combination of both * the 0.0% label can probably be omitted from the centre * drawing a title("") on the plot is still problematic (it overwrites the "N" in some cases) * default background color should be white * a legend title will *very* useful And a question - is it possible to restrict the plot to a portion of the area; say to the left, with a "rectangle" of the space available to the right; or up to the top, with a "rectangle" of the space available to the bottom. Plots often have to annotated and its useful to have some working space to do this. Thanks for all the good work! Derek PS Does anyone else using this program get the strange "[" and "]" signs around the data ranges in the legend - how can this be turned off? >>> Lionel Roubeyrie <[EMAIL PROTECTED]> 2006/10/13 04:06:43 PM >>> Hi all, after some suggestions, here is the latest version of windrose. Now, keywords args are passed by **kwargs, "bar" style have a "opening" arg for controlling the sectors angles, legends are positionned with "legendloc" and their size with "legendsize", and box are not displayed anymore. Hope you find it usefull, any comments welcome. Cordialement -- Lionel Roubeyrie - [EMAIL PROTECTED] LIMAIR http://www.limair.asso.fr -- This message is subject to the CSIR's copyright, terms and conditions and e-mail legal notice. Views expressed herein do not necessarily represent the views of the CSIR. CSIR E-mail Legal Notice http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html CSIR Copyright, Terms and Conditions http://mail.csir.co.za/CSIR_Copyright.html For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR Legal Notice send a blank message with REQUEST LEGAL in the subject line to [EMAIL PROTECTED] This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] windrose 0.3
Le vendredi 13 octobre 2006 08:26, Derek a écrit : > Lionel Roubeyrie <[EMAIL PROTECTED]> writes: > > Hi all, > > continuing on the windroses, here the third version of windrose.py, with > > two others styles (line and bar2 (is it what you want Derek?)). I want to > > know how it's possible to modify the legends to be on axes, and not on > > the figure like in the ex4.png subplots example. > > Lionel > > Looks great! Is it possible to change the size/position of the legend - > the fonts certainly seem too big, and the whole box overlaps the figure. > > Derek Hi Derek, yes it's possible, with: freq,ax=windrose.windplot(vent['VV'],vent['DV'],counts=False,speed_classes=[1,2,3,4,5],sectors=16,style='bar') draw() fig=ax.get_figure() for leg in fig.legends: setp(leg.get_texts(), fontsize=8) > > > > > - > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job > easier Download IBM WebSphere Application Server v.1.0.1 based on Apache > Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Lionel Roubeyrie - [EMAIL PROTECTED] LIMAIR http://www.limair.asso.fr - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] windrose 0.3
Lionel Roubeyrie <[EMAIL PROTECTED]> writes: > > Hi all, > continuing on the windroses, here the third version of windrose.py, with two > others styles (line and bar2 (is it what you want Derek?)). I want to know > how it's possible to modify the legends to be on axes, and not on the figure > like in the ex4.png subplots example. Lionel Looks great! Is it possible to change the size/position of the legend - the fonts certainly seem too big, and the whole box overlaps the figure. Derek - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] windrose 0.3
On Thu, 12 Oct 2006, Lionel Roubeyrie wrote: > here the third version of windrose.py This is great. I think moving the labels farther out would be nicer (e.g., http://www.pscleanair.org/airq/windrose/default.aspx ) Cheers, Alan Isaac - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] windrose 0.2
Hi all, after some searches, I have fixed some r_ticks problems on polaraxes, then I send you the new version of the windrose file, which I hope bugs are removed. You can now make two types of plot, bar and fill, and play with the resulting table of events,in number of counts or in percentage. Usage: import windrose freq,ax=windrose.windplot(speed_array,direction_array,counts=False,speed_classes=[1,2,3,4,5],sectors=18,style='bar') Hope someones use it :-) PS: Sorry if my english is bad -- Lionel Roubeyrie - [EMAIL PROTECTED] LIMAIR http://www.limair.asso.fr windrose.py Description: application/python - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users