You have run into a bug in the combination of poly_between and 
fill--maybe only the former, which not taking masked arrays into 
account.  I have not looked at it enough to know whether it will be easy 
or hard to fix, but it certainly should be fixed.  I can't look at it 
more right now, unfortunately.

Eric

Michaël Douchin wrote:
> Hi list
> 
> I searched the list and google, but couldn't find a way to solve my pbm.
> 
> I have data stored in a list (from an sql query) , with these "columns":
> x = time serie in hours
> y = some level value
> 
> There are some missing values : eg between 08:33 and 08:40.
> Here is my code :
>     sqla="SELECT * FROM import_parcelle a WHERE dat_loc='" + date_traite 
> + "' AND code_uc='" + code_uc + "' ORDER BY a.heu_loc ;"
>     resa=db.query(sqla)
>     data=resa.dictresult()  
> #x = time serie
>     x= [ datetime.datetime(*time.strptime(a["dat_loc"]+" 
> "+a["heu_loc"],'%Y-%m-%d %H:%M:%S')[0:6] )  for a in data]
> #y5 = tank level
>     y5= [float(a["niv_cuv"]) for a in data] # --> extraction de la 
> colonne y1
>     figure()
> # the plot command with no mask
>     
> plot_date(x,y5,color='b',linestyle='None',marker='',xdate=True,ydate=False)
> #the mask
>     #ym5 = ma.masked_where(y5 <300, y5)
>     #plot_date(x,ym5,color='r',linestyle='-',xdate=True,ydate=False)
> #the filling under the curve
>     xs, ys = poly_between(x, 0, y5)
>     fill(xs,ys)
> 
> 
> Here is the result:
> http://michaeldouchin.free.fr/17_2007-06-07_10B_vitesse.png
> As you see, I commented the lines with the mask, because it did not 
> change anything
> 
> To see what I am looking for, here is the result under R (a statistical 
> tool)
> http://michaeldouchin.free.fr/17_2007-06-07_10B_vitesse.jpg
> As you see, between 08:48 and 08:50 (for example), there is a gap, 
> showing we  have no data for this interval.
> 
> As I want to automatically draw this graph for different set of data, I 
> can't look each set in detail.
> I tried to folow the example masked_demo.py, but I could not adapt it to 
> my case....
> 
> Any hint ?
> Thanks very much in advance
> 
> Michael
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to