Skip to content

Commit e71d19c

Browse files
committed
minor fix
1 parent 82797de commit e71d19c

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

bigframes/operations/_matplotlib/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from bigframes.operations._matplotlib.core import MPLPlot
16-
from bigframes.operations._matplotlib.hist import HistPlot
15+
import bigframes.operations._matplotlib.core as core
16+
import bigframes.operations._matplotlib.hist as hist
1717

18-
PLOT_CLASSES: dict[str, type[MPLPlot]] = {
19-
"hist": HistPlot,
18+
PLOT_CLASSES: dict[str, type[core.MPLPlot]] = {
19+
"hist": hist.HistPlot,
2020
}
2121

2222

bigframes/operations/_matplotlib/core.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
import abc
16+
1617
import matplotlib.pyplot as plt
1718

1819

bigframes/operations/plotting.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@
1515
from typing import Optional, Sequence
1616

1717
import bigframes.constants as constants
18-
import bigframes.operations._matplotlib as plotbackend
18+
import bigframes.operations._matplotlib as bfplt
1919
import third_party.bigframes_vendored.pandas.plotting._core as vendordt
2020

21+
2122
class PlotAccessor:
2223
__doc__ = vendordt.PlotAccessor.__doc__
2324

@@ -29,6 +30,5 @@ def hist(self, by: Optional[Sequence[str]] = None, bins: int = 10, **kwargs):
2930
raise NotImplementedError(
3031
f"Only support matplotlib backend for now. {constants.FEEDBACK_LINK}"
3132
)
32-
kwargs["by"] = by
33-
kwargs["bins"] = bins
34-
return plotbackend.plot(self._parent.copy(), kind="hist", **kwargs)
33+
# Calls matplotlib backend to plot the data.
34+
return bfplt.plot(self._parent.copy(), kind="hist", by=by, bins=bins, **kwargs)

docs/reference/bigframes.pandas/frame.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Accessors
1212
---------
1313

1414
Plotting handling
15-
^^^^^^^^^^^^^^^
15+
^^^^^^^^^^^^^^^^^
1616

1717
.. automodule:: bigframes.operations.plotting
1818
:members:

docs/reference/bigframes.pandas/series.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Struct handling
4444
:undoc-members:
4545

4646
Plotting handling
47-
^^^^^^^^^^^^^^^
47+
^^^^^^^^^^^^^^^^^
4848

4949
.. automodule:: bigframes.operations.plotting
5050
:members:

0 commit comments

Comments
 (0)