MCPcopy
hub / github.com/pandas-dev/pandas / __init__

Method __init__

pandas/plotting/_matplotlib/core.py:1502–1514  ·  view source on GitHub ↗
(self, data, x, y, C=None, *, colorbar: bool = True, **kwargs)

Source from the content-addressed store, hash-verified

1500 return "hexbin"
1501
1502 def __init__(self, data, x, y, C=None, *, colorbar: bool = True, **kwargs) -> None:
1503 super().__init__(data, x, y, **kwargs)
1504 if is_integer(C) and not holds_integer(self.data.columns):
1505 C = self.data.columns[C]
1506 self.C = C
1507
1508 self.colorbar = colorbar
1509
1510 # Scatter plot allows to plot objects data
1511 if len(self.data[self.x]._get_numeric_data()) == 0:
1512 raise ValueError(self._kind + " requires x column to be numeric")
1513 if len(self.data[self.y]._get_numeric_data()) == 0:
1514 raise ValueError(self._kind + " requires y column to be numeric")
1515
1516 def _make_plot(self, fig: Figure) -> None:
1517 x, y, data, C = self.x, self.y, self.data, self.C

Callers

nothing calls this directly

Calls 3

_get_numeric_dataMethod · 0.80
holds_integerFunction · 0.70
__init__Method · 0.45

Tested by

no test coverage detected