Hi John, I've finally gotten to the point where I'm making
> really nice plots on the fly in a bit of code I wrote that
> I call from within the analysis part of my code and I must
> say, Matplotlib rules.
Great -- glad it's starting to work for you.
In the future, could you post to the list instead of me directly.
That way the responses show up in the archives, and others can provide
help as well
> But there are a few things that I always find difficult.
> Most of the time the legend is a good bit larger than I'd
> like and I can't seem to figure out how to change that,
> though I'm thinking it probably involves something like
> what you do in legend_demo.py in the examples. Is this
> true, getting the text and then setting its fontsize? and
> then setting the width and height of the frame?
Yes, you can control the size of the text following the example from
examples/legend_demo.py. There are a few other parameters to tweak as
well, eg the following kwargs to the legend command
numpoints = 4 # the number of points in the legend line
fontprop = ... # the font property
pad = 0.2 # the fractional whitespace inside the legend border
markerscale = 0.6 # the relative size of legend markers vs. original
labelsep = 0.005 # the vertical space between the legend entries
handlelen = 0.05 # the length of the legend lines
handletextsep = 0.02 # the space between the legend line and legend text
axespad = 0.02 # the border between the axes and legend edge
Setting the width and height of the frame directly probably won't
help, as this is dynamically resized at drawing time to accommodate
the artists contained inside it.
> Also, I'm making a plot of some signed errors and for some
> reason the y axis seems broken as the negative values are
> being plotting above the positive ones, any idea why this
> might be?
I haven't seen anything like this before. An example which shows the
bug would help, as would the version info provided when you run your
script with --verbose-helpful.