John,

They do behave independently. This is about default behavior. Here 
are some examples (unverified), that assume some standard matplotlib 
rc file.

Ex 1:
No color specified.
MPL and matlab result: both line and marker edge have same default color.

Ex 2:
Set the color with the plot command, e.g. 'r+-' string.
matlab result: both marker and line are red.
MPL result: line is red, marker remains default blue.

Ex 3:
Set colors explicitly, e.g. 'ro-', 'markerfacecolor'=[0,1,0]
matlab and MPL result: line is red, marker face is green.  I 
**believe** that in MPL the marker edge will remain default blue, 
since it is not set explicitly. In matlab, the marker edge will pick 
up the red line color.

Both approaches are reasonable, one simply has to know what to 
expect. In my case, being somewhat new to MPL, I was quite confused 
by how Ex 2 worked in MPL. Now I know better. The matlab approach 
requires somewhat less typing typically.

-Tony

At 8:23 AM -0500 6/29/06, John Hunter wrote:
>  >>>>> "Tony" == Tony Mannucci <[EMAIL PROTECTED]> writes:
>
>     Tony> John, Thanks for the answer.
>
>     Tony> My prime mistake was to assume that matlab behavior is
>     Tony> mimicked in matplotlib. (I am not saying it should
>     Tony> be!). matlab has a Line object and this includes the
>     Tony> markers. So, what I called "bugs" was based on a false
>     Tony> expectation. The matlab version of the code will produce
>     Tony> lines and symbols of the same color.
>
>     Tony> I will spend more time with the matplotlib manual and learn
>     Tony> the differences with matlab, and make progress that way.
>
>Hmm, I didn't know matlab behaved this way.  I know matlab does have
>color, markerfacecolor and margeredgecolor, so I assumed that they
>would be controlled independently.  So the behavior is
>
>   set(l, 'color', 'red')
>
>and both the linestyle and markercolor are changed?
>
>
>JDH


-- 
Tony Mannucci
Supervisor, Ionospheric and Atmospheric Remote Sensing Group
  Mail-Stop 138-308,                     Tel > (818) 354-1699
  Jet Propulsion Laboratory,              Fax > (818) 393-5115
  California Institute of Technology,     Email > [EMAIL PROTECTED]
  4800 Oak Grove Drive,                   http://genesis.jpl.nasa.gov
  Pasadena, CA 91109

Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to