On Wed, May 27, 2009 at 11:33 AM, Andrew Straw <straw...@astraw.com> wrote:
> I've gone ahead and committed my arbitrary spine location implementation
> to the trunk (svn r7144). I'd appreciate it if you could kick the tires.
> To get you started, try the new demo:
> examples/pylab_examples/spine_placement_demo.py

I just did a quick read through of the spine code and example, and
have two minor comments.

You do an isinstance(arg, basestring) to check for string input.
Typically, we encourage cbook.is_string_like to have a central point
of maintenance and consistency for these checks.

Also, in the example, you appear to turn off a spine by setting the
color to 'none'.  My thought it would be more natural to use the
"visible" artist property here (or at least support both)

    @allow_rasterization
    def draw(self,renderer):
        "draw everything that belongs to the spine"
        if not self.get_visible() or self.color.lower()=='none' or not
self.color:
            # don't draw invisible spines
            return
        self.artist.draw(renderer)

Also, I think the class of strings representing "no color" in mpl is
larger -- it should also include self.color.lower()=='none' and the
empty string, which I've included in the example code.

JDH

------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to