Hello,
I got a script (attached, even if without the datafile has less
meaning) that parses a log file and plots 3 datasets. With 0.98.5.3 I
got this error

$ ./ddc_graph.py
Traceback (most recent call last):
  File "./ddc_graph.py", line 39, in <module>
    rc_plot = ax.plot_date(DATES, RC, '-')
  File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line
3356, in plot_date
    ret = self.plot(x, y, fmt, **kwargs)
  File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line 3288, in plot
    for line in self._get_lines(*args, **kwargs):
  File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line
401, in _grab_next_args
    for seg in self._plot_3_args(remaining, **kwargs):
  File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line
340, in _plot_3_args
    x, y, multicol = self._xy_from_xy(x, y)
  File "/usr/lib/python2.5/site-packages/matplotlib/axes.py", line
215, in _xy_from_xy
    by = self.axes.yaxis.update_units(y)
  File "/usr/lib/python2.5/site-packages/matplotlib/axis.py", line
939, in update_units
    converter = munits.registry.get_converter(data)
  File "/usr/lib/python2.5/site-packages/matplotlib/units.py", line
137, in get_converter
    converter = self.get_converter( thisx )
...
  File "/usr/lib/python2.5/site-packages/matplotlib/units.py", line
137, in get_converter
    converter = self.get_converter( thisx )
  File "/usr/lib/python2.5/site-packages/matplotlib/units.py", line
130, in get_converter
    if converter is None and iterable(x):
RuntimeError: maximum recursion depth exceeded

I see the same behavior in .2 but not in 0.98.5. I remembered I've
copied this from an example in mpl doc, but that's all.

Is that a regression or something wrong in the code?

Thanks,
-- 
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi
#!/usr/bin/python

# parse xchat #ddc log file to generate
# RC, NEW and RM graphs
#
# 2008-06-22 - v1.0 - first release, graph NEW anc RC Bugs
# 2008-06-23 - v1.1 - added grid to graph
# 2008-07-23 - v1.2 - added RM queue count
# 2008-11-07 - v1.3 - added data plotting

from __future__ import with_statement
import re, string
from pylab import figure, show, plot
import datetime
from matplotlib.dates import DateFormatter

# regexp to extract interesting lines & data from them
bts_lines = re.compile("BTS has changed the topic to(.*)NEW(,*)")
bts_info = re.compile("(.*) ..BTS has changed the topic to: .* RC bug count: ([^ ]*)  NEW queue: ([^ ]*)  (?:RM queue: ([^ ]*)  )*htt.*")

# local data structures init
DATES = RC = NEW = RM = []

with open('/home/morph/.xchat2/xchatlogs/debian-#debian-devel-changes.log') as f:
    for line in f:
        if bts_lines.search(line):
            # replaces | with space to avoid complexity in regexp rules
            res = bts_info.match(string.replace(line,'|',''))
            #DATES = DATES + [datetime.datetime.strptime('2008 '+res.group(1),'%Y %b %d %H:%M:%S')]
            DATES = DATES + [datetime.datetime.strptime(res.group(1),'%Y-%m-%d %H:%M:%S')]
            RC= RC + [res.group(2)]
            NEW= NEW + [res.group(3)]
            RM = RM + [res.group(4)]

# init figures
fig = figure()
ax = fig.add_subplot(111)
# plot the lines
rc_plot = ax.plot_date(DATES, RC, '-')
new_plot = ax.plot_date(DATES, NEW, '-')
rm_plot = ax.plot_date(DATES, RM, '-')
# legend
ax.legend((rc_plot,new_plot,rm_plot),('RC bugs','NEW pkgs','RM reqs'))
# x data (dates) formatter
ax.xaxis.set_major_formatter( DateFormatter('%Y-%m-%d') )
ax.grid(True)
fig.autofmt_xdate(bottom=0.12)
# show the figure
show()
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to