Description
Summary
We have clf/clear and cla/clear as pairs of related but not quite the same methods an the Figure and Axes classes. The clf
/clear
pair has mostly been consolidated (and is fully in #22735 ), but the cla case is more work because we bunch of Axes subclasses in the code base. Long term I think every Axes subclass:
clear
andcla
should be identical- every subclass should have both
- we should never use cla in the docs
I think ax.cla()
is too widely used to be deprecated solely on the aesthetics grounds so we have to carry it and if one subclass has it they all should (in interest of them being as interchangeable as possible).
Labeling this as a good first issue because a bit of grep will find all of the places in the code that need to be touched and there is (should be) no API choices in this work, but medium difficulty because you should be comfortable moving around a new code base / have a solid grasp of OO inheritance.
Proposed fix
Following the pattern of #22735
- consolidate all implementation undef a
clear
method addadd a clear method to the base classcla = clear
in the class bodiesadd test that this is always trueadd a test that subclasses do not overrideclf