diff --git a/datascience/tables.py b/datascience/tables.py index 2b77abdb..ec5584f2 100644 --- a/datascience/tables.py +++ b/datascience/tables.py @@ -2276,6 +2276,7 @@ def _visualize(self, x_label, y_labels, ticks, overlay, draw, annotate, width=6, if ticks is not None: annotate(axis, ticks) type(self).plots.append(axis) + plt.show() def _split_column_and_labels(self, column_or_label): """Return the specified column and labels of other columns.""" @@ -2313,6 +2314,7 @@ def pivot_hist(self, pivot_column_label, value_column_label, overlay=True, width t['end'] = bins[1:] for label, column in zip(pvt_labels,vals): t[label] = column + plt.show() def hist(self, *columns, overlay=True, bins=None, bin_column=None, unit=None, counts=None, width=6, height=4, **vargs): """Plots one histogram for each column in columns. If no column is @@ -2440,6 +2442,7 @@ def hist(self, *columns, overlay=True, bins=None, bin_column=None, unit=None, co axis.hist(values, color=color, **vargs) _vertical_x(axis) type(self).plots.append(axis) + plt.show() def boxplot(self, **vargs): """Plots a boxplot for the table. @@ -2487,6 +2490,7 @@ def boxplot(self, **vargs): vargs['labels'] = columns.keys() values = list(columns.values()) plt.boxplot(values, **vargs) + plt.show() ###########