Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 0552724 + 2126a43 commit 403edbaCopy full SHA for 403edba
lib/matplotlib/text.py
@@ -741,7 +741,8 @@ def draw(self, renderer):
741
# position in Text, and dash position in TextWithDash:
742
posx = float(textobj.convert_xunits(textobj._x))
743
posy = float(textobj.convert_yunits(textobj._y))
744
-
+ if not np.isfinite(posx) or not np.isfinite(posy):
745
+ raise ValueError("posx and posy should be finite values")
746
posx, posy = trans.transform_point((posx, posy))
747
canvasw, canvash = renderer.get_canvas_width_height()
748
@@ -760,8 +761,6 @@ def draw(self, renderer):
760
761
angle = textobj.get_rotation()
762
763
for line, wh, x, y in info:
- if not np.isfinite(x) or not np.isfinite(y):
764
- continue
765
766
mtext = textobj if len(info) == 1 else None
767
x = x + posx
0 commit comments