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.
1 parent 790c843 commit 25148e1Copy full SHA for 25148e1
lib/matplotlib/text.py
@@ -759,9 +759,12 @@ def draw(self, renderer):
759
# position in Text, and dash position in TextWithDash:
760
posx = float(textobj.convert_xunits(textobj._x))
761
posy = float(textobj.convert_yunits(textobj._y))
762
- if not np.isfinite(posx) or not np.isfinite(posy):
763
- raise ValueError("posx and posy should be finite values")
764
posx, posy = trans.transform_point((posx, posy))
+ if not np.isfinite(posx) or not np.isfinite(posy):
+ warnings.warn("x and y are not finite values for text "
765
+ "string '{}'. Not rendering "
766
+ "text.".format(self.get_text()))
767
+ return
768
canvasw, canvash = renderer.get_canvas_width_height()
769
770
# draw the FancyBboxPatch
0 commit comments