Label text alignment problem?

    Thank you, John. I thought I was lost to PyPlot too,

    > but ... well, matplotlib is just too cool :slight_smile: So I
    > struggled a bit and I managed to get a print of the graph
    > by first saving it to a file and then printing the
    > file. It actually woks on wxPython, I don't expect
    > it to work with I imagine that some people will
    > benefit from this code and I'd be more than happy to give
    > my share to matplotlib. So please let me know how should I
    > send my code. IF I should send it :slight_smile: I'll do it tomorrow
    > if everything is OK, I'm exhausted today.

Definitely send the code. If it's not too big, just post it to the
list. Pasting in the code is better than attachments because the
sourceforge archiver drops attachments (but be careful that the lines
don't wrap). If the code is too long, you can send it to me and I'll
include a link to it on the web site.


Hi John,

    I'm sending the code as an attachement, as it is 215 lines long
and some of them could wrap. Some thoughts about the code: in order to
test it just modify the definitions of IMAGE_FILE and (maybe)
PRINT_DPI. Then start the program and use "print" and "preview" from
the "file" menu. The preview doesn't look like the original plot (at
least on the machines I tested it), and I don't know why. The colors
seem to be twisted or something in the preview. If somebody has any
clues about this, I'd be more than happy to know. However, this is
only a preview problem, the print itself looks fine. Don't expect the
code to run on the current "official" version of wxPython (;
download the test release (or a more recent version) from Only
tested on WinXP and Win2000 with the WXAgg backend, I don't know
anything about the other platforms or backends, if someone else could
test this it would be great. This could certainly be improved by
telling the backend what wxDC it should use to draw the image on (thus
skipping the save image/load image step), but so far I believe this is
a good solution.
    John, I have some comments on the wx / wxAgg backends; I've been
able to totally eliminate the very annoying flicker that I got when
moving a window on a plot canvas. I guess that the dev list would be a
better place for these comments, right? (7.36 KB)