[Repost, sorry if you get this twice.]
Hi guys,
in my quest for a better gnuplot replacement, I came across matplotlib
yesterday.
I really like it, big thanks to the developers.
It was pretty easy to port over a gnuplot command file. There are
two things that could have been easier still though:
* My data file consists of a date (in ISO format) and integers. Parsing
the date was a bit of work. I understand that python's datetime doesn't
provide any parsing of dates - but maybe matplotlib should have some
functions for that then? FWIW, here is how gnuplot does this (adapted
from http://t16web.lanl.gov/Kawano/gnuplot/datetime-e.html):
set xdata time
set timefmt "%Y-%m-%d"
set format x "%Y-%m"
In my matplotlib script, I'm now doing:
mydate = [int(elem) for elem in vals_line[0].split('-')]
datenums.append(date2num(datetime.date(mydate[0], mydate[1], mydate[2])))
[...]
plotline = plot_date(datenums, data)
* gnuplot has a plot style "steps"
(http://t16web.lanl.gov/Kawano/gnuplot/intro/style-e.html) - I
could only fake that with with extra "dummy" points in matplotlib
as I understand it. It would be nice if matplotlib could do this
for me.
Cheers,
Colin
Title: First impression from a new user
- [Matplotlib-users] First impression from a new user Marquardt, Colin
- Re: [Matplotlib-users] First impression from a new u... Jonathan Taylor
- Re: [Matplotlib-users] First impression from a n... Bill Dandreta
- Re: [Matplotlib-users] First impression from... Marquardt, Colin
- Re: [Matplotlib-users] First impression from a new u... John Hunter
- Re: [Matplotlib-users] First impression from a n... Marquardt, Colin
- Re: [Matplotlib-users] First impression from... John Hunter