creating shaded areas

G'day all! I'm back to using matplotlib after a few

    > months away. I'm very impressed with the recent progress!

Thanks. It's good to see you back around in these parts :slight_smile:

    > I often plot the instantaneous variance of repeated
    > recordings made under the same conditions using a shaded
    > area to surround the mean. I'm trying to find a way to do
    > this with matplotlib. Included below is a "filly" (fill
    > y) function I wrote to attempt to do this. It doesn't
    > quite work yet, and I'd like some help. (BTW, I don't
    > know of how this would be done in Matlab, so if there's a
    > more compatible way, I'd be happy to change the approach.)

    > 1) How do I make the data fill the axes automatically,
    > such as the "plot" function?

    > 2) Is it a bug that the polygon is not filled, or am I
    > missing something?

    > I've only tried this in the PS backend -- I'm having
    > troubles with the others at the moment. Also, this is
    > using the version of matplotlib I checked out with CVS.
    > This version fails to build the agg backend with:

    > running build_py package init file 'ttfquery/__init__.py'
    > not found (or not a regular file) package init file
    > 'FontTools/__init__.py' not found (or not a regular file)
    > package init file 'FontTools/fontTools/__init__.py' not
    > found (or not a regular file) package init file
    > 'FontTools/fontTools/encodings/__init__.py' not found (or
    > not a regular file) error: package directory
    > 'FontTools/fontTools/misc' does not exist

I won't get a chance to look at your fill code til Monday (which BTW
is something I've been wanting to add for a while), but the main
problem here is that CVS doesn't have a complete version of the
FontTools* and ttf* that are needed to build from src. The 0.51
release is actually quite up to date and you would probably be best
off just working in that tree for now. vis-a-vis FontTools and
ttfquery - an increasing number of matplotlib backends need ttf font
finding capabilitlities which FontTools and ttfquery provide.
However, they are big and a pain to install and Paul Barrett has been
working on a replacement. At one point I added them to CVS since I
was distributing them with matplotlib but thought twice about it and
tried to remove them. However despite multiple attempts I have not
been able to get them out of CVS (a free beer to anyone with commit
privs who can purge these bastards). No in a nutshell there is an
incomplete version of FontTools and ttfquery in CVS.

If you want to build from CVS, copy the agg, FontTools* and ttfquery
dirs/files from the 0.51 src distro into the CVS tree and build from
there. This will all be cleared up in a few weeks time.

JDH

John Hunter wrote:

    > Also, this is
    > using the version of matplotlib I checked out with CVS.
    > This version fails to build the agg backend with:

    > running build_py package init file 'ttfquery/__init__.py'
    > not found (or not a regular file) package init file
    > 'FontTools/__init__.py' not found (or not a regular file)
    > package init file 'FontTools/fontTools/__init__.py' not
    > found (or not a regular file) package init file
    > 'FontTools/fontTools/encodings/__init__.py' not found (or
    > not a regular file) error: package directory
    > 'FontTools/fontTools/misc' does not exist

I won't get a chance to look at your fill code til Monday (which BTW
is something I've been wanting to add for a while), but the main
problem here is that CVS doesn't have a complete version of the
FontTools* and ttf* that are needed to build from src. The 0.51
release is actually quite up to date and you would probably be best
off just working in that tree for now. vis-a-vis FontTools and
ttfquery - an increasing number of matplotlib backends need ttf font
finding capabilitlities which FontTools and ttfquery provide.
However, they are big and a pain to install and Paul Barrett has been
working on a replacement. At one point I added them to CVS since I
was distributing them with matplotlib but thought twice about it and
tried to remove them. However despite multiple attempts I have not
been able to get them out of CVS (a free beer to anyone with commit
privs who can purge these bastards). No in a nutshell there is an
incomplete version of FontTools and ttfquery in CVS.

This is one of the downsides of CVS; it doesn't deal with directories very well (or at all). A SourceForge support request would be required for one of their admins to go into CVSROOT and manually do this.

What's wrong with distributing them via CVS, at least while they're distributed in the officially released matplotlib sources? It would made things a bit cleaner for those willing to live on the bleeding edge. (Then again, I suppose those willing to live on the bleeding edge are probably also be happy copy a few directories around, too. At least as long as we know what to do.)

If you want to build from CVS, copy the agg, FontTools* and ttfquery
dirs/files from the 0.51 src distro into the CVS tree and build from
there.

Works like a charm!

Cheers!
Andrew

PGP.sig (155 Bytes)