Mirco Schmidt wrote:
> So I gave it a shot:
>
> imported a file like this:
>
> Date (time), Value
> 30.05.11 00:00, 10.200
> 30.05.11 00:01, 10.200
> 30.05.11 00:02, 10.200
> 30.05.11 00:03, 10.200
> 30.05.11 00:04, 10.200
> 30.05.11 00:05, 10.200
> 30.05.11 00:06, 10.200
> 30.05.11 00:07, 10.200
> 30.05.11 00:08, 10.200
> 30.05.11 00:09, 10.200
>
> and got this:
> Traceback (most recent call last):
> File "veusz/utils/treemodel.pyc", line 100, in data
> File "veusz/qtwidgets/datasetbrowser.pyc", line 130, in toolTip
> File "veusz/document/datasets.pyc", line 722, in userPreview
> File "veusz/document/datasets.pyc", line 670, in dsPreviewHelper
> ZeroDivisionError: float division
>
> hhhmmmmmm...
>
> I select Date for X-data and Value for Y-data but no graph show's up!
>
> The question which come's up in my mind is: What do you mean with "local
> time format"?
>
It looks like you've hit a bug in the dataset preview if all the data values
are the same. I'll fix that for the next release.
Here is a CSV file which uses ISO format times which works for me:
Date (time), Value
2011-05-30T00:00:00, 10.200
2011-05-30T00:01:00, 10.200
2011-05-30T00:02:00, 10.200
2011-05-30T00:03:00, 10.200
2011-05-30T00:04:00, 10.200
2011-05-30T00:05:00, 10.200
2011-05-30T00:06:00, 10.204
2011-05-30T00:07:00, 10.4
2011-05-30T00:08:00, 10.2
2011-05-30T00:09:00, 10.1
You can change the T to space.
The local format date times uses what python thinks is the local date
format. I'm not sure this is a good idea to use because the file will be
unreadable on different systems. For my system (UK) the format looks like:
06/06/11 19:48:58, which you can get in python by doing
import datetime
datetime.datetime.now().strftime('%x %X')
I suspect you need to include seconds in your dates to work. Maybe you need
to add seconds, or convert your dates to ISO format. As a future idea for
Veusz, it might be a good idea to add some sort of date option to the
import, e.g. "Date (date HH.MM.SS)"
If you look at the date edit dialog box you'll see nan values for datetimes
which didn't import correctly.
Jeremy
_______________________________________________
Veusz-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/veusz-discuss