8000
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 b6950dfCopy full SHA for b6950df
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):
+ warnst = "x and y are not finite values for text "
765
+ warnst += "string '%s'. Not rendering text."
766
+ warnings.warn(warnst%self.get_text())
767
+ return
768
canvasw, canvash = renderer.get_canvas_width_height()
769
770
# draw the FancyBboxPatch
0 commit comments