Jay de Halas <jdehalas@...> writes:

> 
> 
> First of all, Veusz is an awesome plotting package, it's a great environment 
to work in and is very intuitive to use. I am also very impressed by how fast 
the package is evolving to meet the varied needs of the users.
> 
> 
> More to the point, I am having an issue using "Filter: Expression" with Date 
type Data. The Filter: Expression tool works great with numerical data, but it 
appears to be unable to perform Boolean operations with Date type data.
> With Date type data the Boolean expression appears to evaluate, but generates 
zero length data sets for the result data.
> 
> Example:
>   Dataset: `Fail Date', Size: 500, Type: Date
> 
>   Input Dataset: `Fail Date'
>   Filter Expression: `Fail Date` >  0        Also tried `Fail Date` < 
 0, `Fail Date` >  2008-09-01T00:00:00, etc... Some of the operations will 
generate errors.
>   Output Dataset: Test_Data
> 
>      Dataset: Test_Data, Size: 0, Type: FilterExpression
> 
> 
> 
> 
> I am utterly stumped... 
> 
> Can you provide an example of doing a Boolean operation with a Date Type 
> array 
using the Filter Expression  Data Operation?
> 
> 
> 
> 
> 
> Thanks!!!!
> 
> 
> Jay
> 
> 
> 
> _______________________________________________
> Veusz-discuss mailing list
> Veusz-discuss@...
> https://mail.gna.org/listinfo/veusz-discuss
> 

I had a chance to put together a small sandbox plot that demonstrates the 
underlying issue.

I am starting to form the opinion that the Filter: Expression tool may not play 
well with the Date data type.

Thanks!!!!

Jay

# Veusz saved document (version 1.14)
# Saved at 2011-11-30T22:47:47.191000

DatasetPlugin('FilterExpression', {'filter': u'1', 'ds_out': u"`Copy of Date'", 
'replacenan': True, 'ds_in': u'date'})
DatasetPlugin('FilterExpression', {'filter': u'1', 'ds_out': u"`Copy of 
Index'", 
'replacenan': True, 'ds_in': u'index'})
ImportString(u'date(date)','''
2011-02-02T00:00:00
2011-02-03T00:00:00
2011-02-04T00:00:00
2011-02-05T00:00:00
2011-02-06T00:00:00
2011-02-07T00:00:00
2011-02-08T00:00:00
2011-02-09T00:00:00
2011-02-10T00:00:00
2011-02-11T00:00:00
2011-02-12T00:00:00
2011-02-13T00:00:00
2011-02-14T00:00:00
2011-02-15T00:00:00
2011-02-16T00:00:00
2011-02-17T00:00:00
2011-02-18T00:00:00
2011-02-19T00:00:00
2011-02-20T00:00:00
nan
nan
nan
nan
nan
nan
nan
nan
nan
''')
ImportString(u'date_time(text)',r'''
u'2011-01-01T13:00:00'
u'2011-01-02T13:00:00'
u'2011-01-03T13:00:00'
u'2011-01-04T13:00:00'
u'2011-01-05T13:00:00'
u'2011-01-06T13:00:00'
u'2011-01-07T13:00:00'
u'2011-01-08T13:00:00'
u'2011-01-09T13:00:00'
u'2011-01-10T13:00:00'
u'2011-01-11T13:00:00'
u'2011-01-12T13:00:00'
u'2011-01-13T13:00:00'
u'2011-01-14T13:00:00'
u'2011-01-15T13:00:00'
u'2011-01-16T13:00:00'
u'2011-01-17T13:00:00'
u'2011-01-18T13:00:00'
u'2011-01-19T13:00:00'
u''
u''
u''
u''
u''
u''
u''
u''
u''
''')
ImportString(u'index(numeric)','''
1.000000e+00
2.000000e+00
3.000000e+00
4.000000e+00
5.000000e+00
6.000000e+00
7.000000e+00
8.000000e+00
9.000000e+00
1.000000e+01
1.100000e+01
1.200000e+01
1.300000e+01
1.400000e+01
1.500000e+01
1.600000e+01
1.700000e+01
1.800000e+01
1.900000e+01
nan
nan
nan
nan
nan
nan
nan
nan
nan
''')
Add('page', name='page1', autoadd=False)
To('page1')
Set('width', '21.6cm')
Set('height', '17.8cm')
Add('graph', name='graph1', autoadd=False)
To('graph1')
Add('axis', name='x', autoadd=False)
To('x')
Set('mode', u'datetime')
To('..')
Add('axis', name='y', autoadd=False)
To('y')
Set('direction', 'vertical')
To('..')
Add('xy', name='xy1', autoadd=False)
To('xy1')
Set('xData', u'date')
Set('yData', u'index')
To('..')
To('..')
To('..')
Add('page', name='page2', autoadd=False)
To('page2')
Add('graph', name='graph1', autoadd=False)
To('graph1')
Add('axis', name='x', autoadd=False)
Add('axis', name='y', autoadd=False)
To('y')
Set('direction', 'vertical')
To('..')
Add('xy', name='xy1', autoadd=False)
To('xy1')
Set('xData', u"`Copy of Date'")
Set('yData', u"`Copy of Index'")
To('..')
To('..')
To('..')



_______________________________________________
Veusz-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/veusz-discuss

Répondre à