Skip to content

Commit 878e610

Browse files
committed
Addresed PR comments
1 parent c895916 commit 878e610

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

doc/source/whatsnew/v3.0.0.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -800,7 +800,7 @@ Plotting
800800
- Bug in :meth:`DataFrame.plot.bar` with ``stacked=True`` where labels on stacked bars with zero-height segments were incorrectly positioned at the base instead of the label position of the previous segment (:issue:`59429`)
801801
- Bug in :meth:`DataFrame.plot.line` raising ``ValueError`` when set both color and a ``dict`` style (:issue:`59461`)
802802
- Bug in :meth:`DataFrame.plot` that causes a shift to the right when the frequency multiplier is greater than one. (:issue:`57587`)
803-
- Bug in :meth:`DataFrame.plot` where ``title`` would require more titles than needed when graphing more than one column per subplot. (:issue:`61019`)
803+
- Bug in :meth:`DataFrame.plot` where ``title`` would require extra titles when plotting more than one column per subplot. (:issue:`61019`)
804804
- Bug in :meth:`Series.plot` preventing a line and bar from being aligned on the same plot (:issue:`61161`)
805805
- Bug in :meth:`Series.plot` preventing a line and scatter plot from being aligned (:issue:`61005`)
806806
- Bug in :meth:`Series.plot` with ``kind="pie"`` with :class:`ArrowDtype` (:issue:`59192`)

pandas/plotting/_matplotlib/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -802,14 +802,14 @@ def _adorn_subplots(self, fig: Figure) -> None:
802802
if self.title:
803803
if self.subplots:
804804
if is_list_like(self.title):
805-
if type(self.subplots) != bool:
805+
if not isinstance(self.subplots, bool):
806806
if len(self.subplots) != len(self.title):
807807
raise ValueError(
808808
"The length of `title` must equal the number "
809809
"of subplots if `title` of type `list` "
810810
"and subplots is iterable.\n"
811-
f"length of title = {len(self.title)}\n"
812-
f"number of subplots = {len(self.subplots)}"
811+
f"The number of titles ({len(self.title)}) must equal "
812+
f"the number of subplots ({len(self.subplots)})."
813813
)
814814
elif len(self.title) != self.nseries:
815815
raise ValueError(

0 commit comments

Comments
 (0)