Skip to content

Commit

Permalink
removed colors argument for Table#scatter
Browse files Browse the repository at this point in the history
  • Loading branch information
adnanhemani committed Jun 28, 2019
1 parent 2ba25c5 commit da10834
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 11 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ pip install datascience

This project adheres to [Semantic Versioning](http://semver.org/).

### v0.12.1
* No longer support the `colors` argument for `Table#scatter`.

### v0.12.0
* Changes `Table#scatter`'s argument name of `colors` to `group` to mirror `Table#hist`.
* Makes a grouped scatterplot's legend identical to a group histogram's legend.
Expand Down
13 changes: 3 additions & 10 deletions datascience/tables.py
Original file line number Diff line number Diff line change
Expand Up @@ -2288,8 +2288,7 @@ def group_barh(self, column_label, **vargs):
self.group(column_label).barh(column_label, **vargs)

def scatter(self, column_for_x, select=None, overlay=True, fit_line=False,
group=None, labels=None, sizes=None, width=5, height=5, s=20,
colors=None, **vargs):
group=None, labels=None, sizes=None, width=5, height=5, s=20, **vargs):
"""Creates scatterplots, optionally adding a line of best fit.
Args:
Expand Down Expand Up @@ -2356,14 +2355,8 @@ def scatter(self, column_for_x, select=None, overlay=True, fit_line=False,
options.update(vargs)

x_data, y_labels = self._split_column_and_labels(column_for_x)
if group is not None and colors is not None and group != colors:
warnings.warn("Do not pass both colors and group to scatter().")
if group is None and colors is not None:
# Backward compatibility
group = colors
# TODO: In a future release, warn that this is deprecated.
# Deprecated
# warnings.warn("scatter(colors=x) is deprecated. Use scatter(group=x)", FutureWarning)
if "colors" in vargs and vargs["colors"]:
warnings.warn("scatter(colors=x) has been removed. Use scatter(group=x)", FutureWarning)
if group is not None:
y_labels.remove(self._as_label(group))
if sizes is not None:
Expand Down
2 changes: 1 addition & 1 deletion datascience/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.12.0'
__version__ = '0.12.1'

0 comments on commit da10834

Please sign in to comment.