OK, I found the problem and committed a temporary fix. The real problem,
however is rooted a bit deeper.

First an explanation of the intended change:

It used to be that marker colors were partly automatic, but not
completely. I.e.

    plot(x,y,'-or')

would set both, line color and marker color to red. However

    plot(x,y,color='r')

would set only the line color and leave marker color to the default.
My change was to introduce a special value 'auto' for markeredgecolor and
markerfacecolor. This special value would cause the marker color to
always follow
the line color. (Which is, in 99% of the cases, what you want.) Most of
the special logic in axes.py could therefore go away. mfc and mec would
simply be left at 'auto' unless explicitely assigned another color. The
handling of the special value would then happen in lines.py at time of
plotting. (including the effect that for filled markers, the edge would
default to black)

The problem in r2790: I changed the default value in matplotlibrc to
'auto' and everything worked fine for me. I forgot that, of course,
anybody updating from an older version, would still have the values
'blue' and 'black' in their matplotlibrc, which would not be overridden
by the '.r' option that Stefan used.

The (temporary) solution in r2800: I deactivated the
rcfile-configurability of markeredgecolor and markerfacecolor. Assuming
that hardly anybody would want to change the 'auto' behavior in their
rcfile, this should be a good solution until we have solved the core
problem.

The core problem: The matplotlibrc file distributed with matplotlib
contains all the default values in non-commented lines. This file is
usually copied to the home-directory of any user, making it impossible
to simply change any default value in later versions. It is not possible
to find out which values in the users matplotlibrc were set on purpose
and which were just left untouched from the distributed file.

The better solution: place '#' at the beginning of every line in
matplotlibrc.template (except for 'backend' and 'numerix' which carry
important information) Any user who explicitely wants to change a value,
can simply uncomment the line and set a value. Otherwise, the default
value from matplotlib/__init__.py will remain active, even if changed in
an update. Of course, this would only make sense, if users were informed
and encouraged to replace their personal matplotlibrc

The ultimate solution: The file matplotlib.template should probably be
dropped completely and be auto-created from the information in
matplotlib/__init__.py - this would remove quite some redundancy and
potential for inconsistencies.

Comments on this?

Greetings,
Norbert



John Hunter wrote:
>>>>>> "Eric" == Eric Firing <[EMAIL PROTECTED]> writes:
>>>>>>             
>
>     Eric> So: please either restore your patch with additional changes
>     Eric> to fix the problem Stefan found, or revert all of it cleanly
>     Eric> until this can be sorted out.
>
> Norbert -- can you describe briefly the inconsistencies in the format
> arg color handling you were trying to address in your patch?  I see
> this --
> http://sourceforge.net/tracker/index.php?func=detail&aid=1504387&group_id=80706&atid=560722
> -- but not much detail about the problems the changes fix.  
>
> Also, for all developers, when making API changes
>
>   * post here with a brief descriptions of changes and rationale
>
>   * make a note in API_CHANGES
>
>   * run backend_driver.py.  It is a good habit to not only run the
>     script to make sure no exceptions are raised, but also to view
>     the output PNG etc files in your favorite image viewer to make
>     sure the output is correct
>
>
> Thanks!
> JDH
>
> -------------------------------------------------------------------------
> 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
>
>
>   


-------------------------------------------------------------------------
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