Re: [Matplotlib-users] Hovemuller Diagram

2013-07-13 Thread Andrew Dawson
I meant the coordinates, so one representing latitude or longitude and one
representing time (filled with datetime objects), should be 1d. This only
applies if your coordinate actually contains datetime objects, if not then
coordinates can be 2d as the documentation says.
On 13 Jul 2013 02:22, "Sudheer Joseph"  wrote:

> Hi,
>
> I did not understand 1d mentioned by you? for a diagram like this 2D is
> must as it need longitude /latitude and also time
> with best regards,
> Sudheer
>
> From: Andrew Dawson 
>
> To: Phil Elson 
> >Cc: Sudheer Joseph ; "
> matplotlib-users@lists.sourceforge.net" <
> matplotlib-users@lists.sourceforge.net>
> >Sent: Friday, 12 July 2013 1:28 PM
> >Subject: Re: [Matplotlib-users] Hovemuller Diagram
> >
> >
> >
> >As long as you use contour or contourf and your coordinates are 1d you
> should be able to do this no problem, just like Phil said. However, there
> is a bug that will prevent you from using pcolormesh or pcolor
> unfortunately.
> >
> >
> >Andrew
> >
> >
> >
> >On 12 July 2013 08:51, Phil Elson  wrote:
> >
> >The balance of time to install vs time to re-implement a feature is only
> something you can decide, but i suspect it is worth your while getting iris
> installed (I would say that as an iris developer though). The installation
> process is only going to get easier over time, for instance last week we
> added a PPA so that with the necessary repos added you would be able to
> "apt-get install python-iris" on an Ubuntu machine - for other installation
> guides there is a repository of recipes (
> https://github.com/SciTools/installation-recipes ).
> >>As for achieving this without iris, it is perfectly feasible. You just
> need to contourf your data with the longitude as your x coordinate and the
> date times as your y coordinate. From memory you might also need to tell
> matplotlib that the y coordinate is date/time (I think that is a mpl bug
> that ajdawson has recently addressed). Obviously, basemap is not needed as
> you are not drawing a longitude/latitude plot but a longitude/time or
> latitude/time one.
> >>HTH,
> >>Phil
> >>
> >>
> >>
> >>On 11 July 2013 19:06, Sudheer Joseph  wrote:
> >>
> >>Thank you Signell,
> >>>   I was looking for better looking labels as well
> as a solution with in matplotlib without needing to install additional
> packages. I had some trouble with some libraries while trying to install
> iris. I was wondering if it is possible with in matplotlib with out
> additional installations using the features of basemap package.
> >>>
> >>>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: "Signell, Richard" 
>  To: Sudheer Joseph 
>  Cc:
>  Sent: Friday, 12 July 2013 12:41 AM
>  Subject: Re: [Matplotlib-users] Hovemuller Diagram
> 
>  I don't think I understand your problem.  Are you just trying to get
>  nicer looking tick labels?
> 
> 
>  On Thu, Jul 11, 2013 at 11:03 AM, Sudheer Joseph
>   wrote:
> >  Thanks Signell,
> >I had seen it but it is not the correct type
> with
>  Longitude axis, it is having just numbers on x axis I expect axis
> like the ones
>  we get from basemap package.
> >>>
> >  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: "Signell, Richard" 
> >>  To: Sudheer Joseph 
> >>  Cc:
> >>  Sent: Thursday, 11 July 2013 7:20 PM
> >>  Subject: Re: [Matplotlib-users] Hovemuller Diagram
> >>
> >>
> http://scitools.org.uk/iris/docs/v1.0/examples/graphics/hovmoller.html
> >>
> >>  On Thu, Jul 11, 2013 at 5:40 AM, Sudheer Joseph
> >>   wrote:
> >>>
> >>>   Dear All,
> >

Re: [Matplotlib-users] Hovemuller Diagram

2013-07-13 Thread Sudheer Joseph


Thank Daswson  & Sterling,
   Got it, you meant the data should not have date and 
longitude against each grid point instead should have only 2 vectors rather 
than grid.
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: Andrew Dawson 
>To: Sudheer Joseph  
>Cc: "Matplotlib-users@lists.sourceforge.net" 
>; Phil Elson  
>Sent: Saturday, 13 July 2013 1:04 PM
>Subject: Re: [Matplotlib-users] Hovemuller Diagram
> 
>
>
>I meant the coordinates, so one representing latitude or longitude and one 
>representing time (filled with datetime objects), should be 1d. This only 
>applies if your coordinate actually contains datetime objects, if not then 
>coordinates can be 2d as the documentation says.
>On 13 Jul 2013 02:22, "Sudheer Joseph"  wrote:
>
>Hi,
>>
>>I did not understand 1d mentioned by you? for a diagram like this 2D is must 
>>as it need longitude /latitude and also time
>>with best regards,
>>Sudheer
>>
>>From: Andrew Dawson 
>>
>>To: Phil Elson 
>>>Cc: Sudheer Joseph ; 
>>>"matplotlib-users@lists.sourceforge.net" 
>>>
>>>Sent: Friday, 12 July 2013 1:28 PM
>>>Subject: Re: [Matplotlib-users] Hovemuller Diagram
>>>
>>>
>>>
>>>As long as you use contour or contourf and your coordinates are 1d you 
>>>should be able to do this no problem, just like Phil said. However, there is 
>>>a bug that will prevent you from using pcolormesh or pcolor unfortunately.
>>>
>>>
>>>Andrew
>>>
>>>
>>>
>>>On 12 July 2013 08:51, Phil Elson  wrote:
>>>
>>>The balance of time to install vs time to re-implement a feature is only 
>>>something you can decide, but i suspect it is worth your while getting iris 
>>>installed (I would say that as an iris developer though). The installation 
>>>process is only going to get easier over time, for instance last week we 
>>>added a PPA so that with the necessary repos added you would be able to 
>>>"apt-get install python-iris" on an Ubuntu machine - for other installation 
>>>guides there is a repository of recipes ( 
>>>https://github.com/SciTools/installation-recipes ).
As for achieving this without iris, it is perfectly feasible. You just need 
to contourf your data with the longitude as your x coordinate and the date 
times as your y coordinate. From memory you might also need to tell 
matplotlib that the y coordinate is date/time (I think that is a mpl bug 
that ajdawson has recently addressed). Obviously, basemap is not needed as 
you are not drawing a longitude/latitude plot but a longitude/time or 
latitude/time one.
HTH,
Phil



On 11 July 2013 19:06, Sudheer Joseph  wrote:

Thank you Signell,
>   I was looking for better looking labels as well as 
>a solution with in matplotlib without needing to install additional 
>packages. I had some trouble with some libraries while trying to install 
>iris. I was wondering if it is possible with in matplotlib with out 
>additional installations using the features of basemap package.
>
>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: "Signell, Richard" 
>> To: Sudheer Joseph 
>> Cc:
>> Sent: Friday, 12 July 2013 12:41 AM
>> Subject: Re: [Matplotlib-users] Hovemuller Diagram
>>
>> I don't think I understand your problem.  Are you just trying to get
>> nicer looking tick labels?
>>
>>
>> On Thu, Jul 11, 2013 at 11:03 AM, Sudheer Joseph
>>  wrote:
>>>  Thanks Signell,
>>>                        I had seen it but it is not the correct type with
>> Longitude axis, it is having just numbers on x axis I expect axis like 
>> the ones
>> we get from basemap package.
>
>>>  with best regards,
>>>  sudheer
>>>
>>>
>>>
>>>  *

Re: [Matplotlib-users] Hovemuller Diagram

2013-07-13 Thread Sudheer Joseph
Hi,

Is there a way to make the below as a hovemuler diagram which I tired but could 
not succeed  

import pandas as pd
 
dates = pd.date_range('20130101',periods=30)
df=pd.DataFrame(np.random.randn(30,5),index=dates)
From: Andrew Dawson 

To: Sudheer Joseph  
>Cc: "Matplotlib-users@lists.sourceforge.net" 
>; Phil Elson  
>Sent: Saturday, 13 July 2013 1:04 PM
>Subject: Re: [Matplotlib-users] Hovemuller Diagram
> 
>
>
>I meant the coordinates, so one representing latitude or longitude and one 
>representing time (filled with datetime objects), should be 1d. This only 
>applies if your coordinate actually contains datetime objects, if not then 
>coordinates can be 2d as the documentation says.
>On 13 Jul 2013 02:22, "Sudheer Joseph"  wrote:
>
>Hi,
>>
>>I did not understand 1d mentioned by you? for a diagram like this 2D is must 
>>as it need longitude /latitude and also time
>>with best regards,
>>Sudheer
>>
>>From: Andrew Dawson 
>>
>>To: Phil Elson 
>>>Cc: Sudheer Joseph ; 
>>>"matplotlib-users@lists.sourceforge.net" 
>>>
>>>Sent: Friday, 12 July 2013 1:28 PM
>>>Subject: Re: [Matplotlib-users] Hovemuller Diagram
>>>
>>>
>>>
>>>As long as you use contour or contourf and your coordinates are 1d you 
>>>should be able to do this no problem, just like Phil said. However, there is 
>>>a bug that will prevent you from using pcolormesh or pcolor unfortunately.
>>>
>>>
>>>Andrew
>>>
>>>
>>>
>>>On 12 July 2013 08:51, Phil Elson  wrote:
>>>
>>>The balance of time to install vs time to re-implement a feature is only 
>>>something you can decide, but i suspect it is worth your while getting iris 
>>>installed (I would say that as an iris developer though). The installation 
>>>process is only going to get easier over time, for instance last week we 
>>>added a PPA so that with the necessary repos added you would be able to 
>>>"apt-get install python-iris" on an Ubuntu machine - for other installation 
>>>guides there is a repository of recipes ( 
>>>https://github.com/SciTools/installation-recipes ).
As for achieving this without iris, it is perfectly feasible. You just need 
to contourf your data with the longitude as your x coordinate and the date 
times as your y coordinate. From memory you might also need to tell 
matplotlib that the y coordinate is date/time (I think that is a mpl bug 
that ajdawson has recently addressed). Obviously, basemap is not needed as 
you are not drawing a longitude/latitude plot but a longitude/time or 
latitude/time one.
HTH,
Phil



On 11 July 2013 19:06, Sudheer Joseph  wrote:

Thank you Signell,
>   I was looking for better looking labels as well as 
>a solution with in matplotlib without needing to install additional 
>packages. I had some trouble with some libraries while trying to install 
>iris. I was wondering if it is possible with in matplotlib with out 
>additional installations using the features of basemap package.
>
>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: "Signell, Richard" 
>> To: Sudheer Joseph 
>> Cc:
>> Sent: Friday, 12 July 2013 12:41 AM
>> Subject: Re: [Matplotlib-users] Hovemuller Diagram
>>
>> I don't think I understand your problem.  Are you just trying to get
>> nicer looking tick labels?
>>
>>
>> On Thu, Jul 11, 2013 at 11:03 AM, Sudheer Joseph
>>  wrote:
>>>  Thanks Signell,
>>>                        I had seen it but it is not the correct type with
>> Longitude axis, it is having just numbers on x axis I expect axis like 
>> the ones
>> we get from basemap package.
>
>>>  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
>>>  ***