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

Reply via email to