Hi,

I'm trying to display a scatter plot in 3D, and it calls the 2D scatter
plot, in axes.py. This method tests for validity of the color argument in
line 3777 :

       if not is_string_like(c) and iterable(c) and len(c)==len(x):
           colors = None
       else:
           colors = ( colorConverter.to_rgba(c, alpha), )

The trick is that if c is a numpy array, it passes the test, and thus no
color is selected. If I get rid of the test and use a Nx3 array, the plot is
correctly displayed.

I suppose that we could make it :

       if not (is_string_like(c) or is_numlike(c)) and iterable(c) and
len(c)==len(x):
           colors = None
       else:
           colors = ( colorConverter.to_rgba(c, alpha), )

?

I found a little error in a docstring, if this proposal is OK, I'll send a
diff patch to the list.

Matthieu
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to