[SciPy-user] scikit.timeseries plotting bugs?
Fri Dec 5 11:26:10 CST 2008
I'm attaching a ascii datafile called JDM3_short.txt and the commands I typed in ipython to reproduce the problem. The first figure works the second has the correct axes but is blank.
In : import sys
In : import subprocess
In : from numpy import *
In : from pylab import *
In : import datetime
In : import scikits.timeseries as ts
In : import scikits.timeseries.lib.plotlib as tpl
In : import numpy.ma as ma
In : fieldfile='JDM3_short.txt'
In : year, month, day, hour, minute, fdata = loadtxt(fieldfile,comments="#",usecols=(0,1,2,3,4,8),unpack=True)
In : fielddates = [datetime.datetime(int(y),int(m),int(d),int(hh),int(mm),0) for y,m,d,hh,mm in zip(year,month,day,hour,minute)]
In : fdates = ts.date_array(fielddates,freq='MIN')
In : fseries = ts.time_series(fdata, dates=fdates)
In : #remove -999.9 nodata values fo parameter
In : fseries[fseries==-999.9] = ma.masked
In : fseries = fseries.fill_missing_dates()
In : fig = tpl.tsfigure()
In : fsp = fig.add_tsplot(111)
In : fsp.tsplot(fseries, '.')
Out: [<matplotlib.lines.Line2D object at 0x23cafd0>]
In : fig1 = tpl.tsfigure()
In : fsp1 = fig1.add_tsplot(111)
In : fsp1.tsplot(fseries, 'b', label='data')
Out: [<matplotlib.lines.Line2D object at 0x3109650>]
In : show()
>>> "Dharhas Pothina" <Dharhas.Pothina@twdb.state.tx.us> 12/05/08 10:42 AM >>>
Ok I've narrowed it down. It has nothing to do with plotting two timeseries. The problem is plotting the any of the original timeseries I read from files. Once I convert them to daily means the plotting works fine.
With the original timeseries whether it plots or not seems to depend on what plotting symbol I use.
>> If I use two commands and certain other symbols like 'b',b--' etc
>> for the first series, it only plots the second series :
> ??? can't reproduce this one...
I've double checked, its happening consistently with multiple datasets (The datasets are similar just at different locations). How do I track down the problem? Should I send you a datafile and my short script?
SciPy-user mailing list
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
More information about the SciPy-user