Closed andrewheusser closed 7 years ago
use case: we want to plot a list of subjects, but color each dot by condition, not by subject
great idea! if we don't already have them, we should have assert
statements to ensure that the arguments are provided in a consistent format (e.g. that their sizes agree with each other).
also, for simplicity, i think categories should override colors. if both colors and categories are specified, we should throw a warning saying that colors will be ignored. and we could (optionally?) show a legend denoting which colors go with which categories, since we'll already have the category labels.
another potential option to consider for a future implementation, would be to have categories be denoted by marker styles (e.g. 'o', '.', 'x', etc.) and/or line styles (e.g. '-', ':', '.-', etc.) if the colors are specified via another argument (and the marker/line styles aren't).
or, a third option would be to have each family of plots assigned to a different color map. e.g. for the first set up points we use colormap 1, for the second set of points we use colormap 2, etc. then on the side we plot a legend table showing which sets of colors go with each category (one row per category, one column per family of points).
this is implemented on the point_colors branch, closing issue
After playing around with coloring, I thought it would make sense to add a 'categories' keyword argument to plot_coords that takes a list of category labels, and then automatically colors according to those labels. e.g.
plot_coords.plot_coords(x,categories=[['a','b','c'],['a','b','c']])
@jeremymanning what do you think?