Re: [Matplotlib-users] windrose
On 5 April 2013 03:54, Sudheer Joseph sudheer.jos...@yahoo.com 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, 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 scott.sinclair...@gmail.com To: matplotlib-users@lists.sourceforge.net 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 sudheer.jos...@yahoo.com 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 4 April 2013 06:45, Sudheer Joseph sudheer.jos...@yahoo.com 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
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 scott.sinclair...@gmail.com To: matplotlib-users@lists.sourceforge.net 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 sudheer.jos...@yahoo.com 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 Tue, Mar 19, 2013 at 2:22 AM, Sudheer Joseph sudheer.jos...@yahoo.comwrote: Dear users, Attached is a windrose diagram created by using https://sourceforge.net/project/showfiles.php?group_id=239240package_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 pmhob...@gmail.com wrote: On Tue, Mar 19, 2013 at 2:22 AM, Sudheer Joseph sudheer.jos...@yahoo.com wrote: Dear users, Attached is a windrose diagram created by using https://sourceforge.net/project/showfiles.php?group_id=239240package_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
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 pmhob...@gmail.com To: Sudheer Joseph sudheer.jos...@yahoo.com Cc: matplotlib-users@lists.sourceforge.net 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 sudheer.jos...@yahoo.com wrote: Dear users, Attached is a windrose diagram created by using https://sourceforge.net/project/showfiles.php?group_id=239240package_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=239240package_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=100url=/ ___ 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 module 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# if True, draw a shadow behind legend
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/ORR(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=100url=/___ 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/ORR(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=100url=/ ___ 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=100url=/ ___ 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=100url=/ ___ 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 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
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=lnkkid=120709bid=263057dat=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=lnkkid=120709bid=263057dat=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=lnkkid=120709bid=263057dat=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=lnkkid=120709bid=263057dat=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=lnkkid=120709bid=263057dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users