-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ColorbarBase differs from Colorbar in that it is not associated with a ScalarMappable (but constructed from explicit cmap/norm), but we already document in Figure.colorbar that the preferred way to draw colorbars not associated with an existing artist is to create an empty ScalarMappable to provide `norm` and `cmap`. Hence, likewise merge Colorbar and ColorbarBase (creating the ScalarMappable on-the-fly if no mappable is passed to the constructor), which should make the APIs clearer. (Note that we are already discouraging users to directly call either class' constructors, anyways). We could deprecate the backcompat APIs (i.e., the `ColorbarBase` alias, the `cmap` and `norm` kwargs, and the different semantics of `add_lines`), but that can be done later; this PR should be entirely backcompatible.
- Loading branch information
Showing
6 changed files
with
162 additions
and
178 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.