Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4146b21

Browse files
committed
Fix limit setting when plotting empty data
1 parent ff54be0 commit 4146b21

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/matplotlib/axes/_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2148,7 +2148,7 @@ def update_datalim(self, xys, updatex=True, updatey=True):
21482148
Whether to update the x/y limits.
21492149
"""
21502150
xys = np.asarray(xys)
2151-
if not len(xys):
2151+
if not np.any(np.isfinite(xys)):
21522152
return
21532153
self.dataLim.update_from_data_xy(xys, self.ignore_existing_data_limits,
21542154
updatex=updatex, updatey=updatey)

0 commit comments

Comments
 (0)