altair_pandas icon indicating copy to clipboard operation
altair_pandas copied to clipboard

unified additional properties

Open Casyfill opened this issue 6 years ago • 0 comments

most (all?) pandas plot functions support

  • color
  • title
  • figsize
  • ax
  • alpha
  • cmap
  • legend

Many also support shape and size. Part of those arguments can take a specific value (e.g. color='red'), a dataframe column (e.g. color='column2'), or a new array of the same length.

We probably want to support those for altair as well, preferably in a unified fashion. Below is my first attempt - it does support title, color and alpha for all the given charts, and can switch between specific values, columns, and corresponding Altair objects. Arrays are not supported yet.

One question I need some advice on is to where should this happen?

right now, it works in the plot method. I think that it is safer to have this working separately for a DataFrame / Series plotters. I can decorate each method, or run the function from within each method if that's ok. That way we can use a similar strategy for scatterplot c/s values.

Will be thankful for the feedback

Screenshot 2019-08-27 13 30 07

Casyfill avatar Aug 27 '19 17:08 Casyfill