-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
allow using categorical data for color, marker, size, … #6214
Copy link
Copy link
Open
Labels
Difficulty: Hardhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesNew featurekeepItems to be ignored by the “Stale” Github ActionItems to be ignored by the “Stale” Github Actiontopic: categorical
Milestone
Metadata
Metadata
Assignees
Labels
Difficulty: Hardhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issueshttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesNew featurekeepItems to be ignored by the “Stale” Github ActionItems to be ignored by the “Stale” Github Actiontopic: categorical
Type
Fields
Give feedbackNo fields configured for issues without a type.
currently specifying an array for color or size, only works for continuous data. using markers and colors mapped to subsets based on categorical data is hard and manual (basically you subset the data in a loop and call plot multiple times).
i thought it would be hard as list-of-string already means something for some parameters (markers and colors can be specified as strings). but there is pandas’ category dtype.
i propose that using a categorical vector for one of these parameters should be automatically mapped to a palette of colors/markers when specified as
cormarker.more palettes than just the colormap
the color palette for categorical data would be
plt.rcParams['axes.prop_cycle'].by_key()['color'], the marker palette a newrcParam(maybe?)those palettes would be cycled if there are too many categories.
legends
open questions
data=interface