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

Method result

pandas/plotting/_matplotlib/core.py:623–644  ·  view source on GitHub ↗

Return result axes

(self)

Source from the content-addressed store, hash-verified

621
622 @property
623 def result(self):
624 """
625 Return result axes
626 """
627 if self.subplots:
628 if self.layout is not None and not is_list_like(self.ax):
629 # error: "Sequence[Any]" has no attribute "reshape"
630 return self.axes.reshape(*self.layout) # type: ignore[attr-defined]
631 else:
632 return self.axes
633 else:
634 sec_true = isinstance(self.secondary_y, bool) and self.secondary_y
635 # error: Argument 1 to "len" has incompatible type "Union[bool,
636 # Tuple[Any, ...], List[Any], ndarray[Any, Any]]"; expected "Sized"
637 all_sec = (
638 is_list_like(self.secondary_y) and len(self.secondary_y) == self.nseries # type: ignore[arg-type]
639 )
640 if sec_true or all_sec:
641 # if all data is plotted on secondary, return right axes
642 return self._get_ax_layer(self.axes[0], primary=False)
643 else:
644 return self.axes[0]
645
646 @final
647 @staticmethod

Callers 1

run_multithreadedFunction · 0.45

Calls 2

_get_ax_layerMethod · 0.95
reshapeMethod · 0.45

Tested by

no test coverage detected