Crash in CVS

Hi there, I've just started playing with matplot and am

    > VERY impressed.


    >However, I thought I'd mention two items
    > in case no one else has seen them.

    > 1) There are a lot of Deprecation warnings on loading.

Thanks for the alert. Are you using python2.3? I've heard that 2.3
generates deprecation warnings and I plan to get them cleaned up in
the near future and do a bug-fix release, probably 0.21.

    > 2) I can generate an X Window Error via a gdk
    > crash. Here's the tail of the trace: [------ File
    > "/usr/lib/python2.3/site-packages/matplotlib/",
    > line 310, in _set_font self._layout =
    > self._drawingArea.create_pango_layout(self._text)
    > TypeError: GtkWidget.create_pango_layout() argument 1
    > must be string, not int The program '' received

Looks like you passed an integer to a text label command in the
set(gca..., command that is causing your troubles. If you are trying
to set a ticklabel, note that they must be strings, not ints. Eg,

  set(gca(), 'xticklabels', ['%d' % val for val in arange(8)])


  set(gca(), 'xticklabels', arange(8))

Is this the source of your troubles (The example code you meant to
send didn't come through)? Check it out. If not, send me the script
that generates the error and I'll take a look. I haven't seen this
bug before (and I use the library a lot <wink>).

John Hunter

Yes, I've just started using python2.3, which is almost certainly the
source of the deprecation warnings.

And yes, I had passed an integer to the text label command. The crash
seems a bit harsh, but at least I can avoid that now.

I generated a graph with 8 subplots (histograms). I wasn't able to use
the title command on the subplots, because the title appeared on top of
the plot above it. And I haven't yet figured out how to give the plot an
overall title. I'm happy for hints if you have the time. Otherwise I'm
fairly happy with what I've got (titles inside each subplot, via the
text command, and no overall title).

Thanks! This is great!


Charles R. Twardy Monash University, School of CSSE
ctwardy at alumni indiana edu +61(3) 9905 5823 (w) 5146 (fax)
  "eloquence ought to be banish'd out of all civil Societies as a
   thing fatal to Peace and good Manners..." ~Sprat 1667