Skip to content

Commit 8129766

Browse files
committed
fixing test errors
1 parent ca3d36a commit 8129766

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

bigframes/operations/_matplotlib/core.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616
import typing
1717
import uuid
1818

19-
import matplotlib.pyplot as plt
2019
import pandas as pd
2120

2221
import bigframes.dtypes as dtypes
2322

2423
DEFAULT_SAMPLING_N = 1000
2524
DEFAULT_SAMPLING_STATE = 0
2625

26+
2727
class MPLPlot(abc.ABC):
2828
@abc.abstractmethod
2929
def generate(self):
@@ -105,7 +105,6 @@ def _compute_plot_data(self):
105105
c_id = None
106106
if self._is_sequence_arg(c):
107107
c_id = self._generate_new_column_name(data)
108-
print(c_id)
109108
data[c_id] = c
110109

111110
sample = self._compute_sample_data(data)

tests/system/small/operations/test_plotting.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,11 @@ def test_scatter_args_c_sampling():
259259
pd_df = pd.DataFrame(data)
260260

261261
ax = df.plot.scatter(x="plot_temp_0", y="plot_temp_1", c=c, sampling_n=3)
262-
pd_ax = pd_df.plot.scatter(x="plot_temp_0", y="plot_temp_1", c=c)
262+
263+
sampling_index = [0, 1, 2]
264+
pd_ax = pd_df.iloc[sampling_index].plot.scatter(
265+
x="plot_temp_0", y="plot_temp_1", c=[c[i] for i in sampling_index]
266+
)
263267
assert len(ax.collections[0].get_facecolor()) == len(
264268
pd_ax.collections[0].get_facecolor()
265269
)

0 commit comments

Comments
 (0)