GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||
GeezerVison is showing github.com — Update to docs with regards to colorbar and colorizer by trygvrad · Pull Request #30112 · matplotlib/matplotlib Conversation
|
| A `~.Figure.colorbar` needs a "mappable" (`matplotlib.colorizer.ColorizingArtist`) | ||
| object (typically, an image) which contains a colorizer | ||
| (`matplotlib.colorizer.Colorizer`) that holds the data-to-color pipeline (norm and | ||
| colormap). In order to create a colorbar without an attached image, one can instead | ||
| use a `.ColorizingArtist` with no associated data. |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I think you can be more straightforward. ColorizingArtist is the base class for everything that "can be colormapped". Directly instruct to create the base class and pass it to colorbar. This the detour "typically subclasses with data, like image, but you can create without data" is not needed for the context of creating a standalone colorbar.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the feedback, does the following read more easily:
""" A `~.Figure.colorbar` requires a `matplotlib.colorizer.ColorizingArtist` which contains a `matplotlib.colorizer.Colorizer` that holds the data-to-color pipeline (norm and colormap). To create a colorbar without an attached plot one can use a `.ColorizingArtist` with no associated data. """
(and should we remove the last sentence?)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
This is okish. Maybe an improvement would be to switch the last sentence for
To create a colorbar without an attached plot one can directly instantiate the
base class.ColorizingArtist, which has no associated data.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Done :)
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thank you @timhoffm, all the suggestions should be addressed now :) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
d56d471 to
150165b
Compare
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.