File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -551,6 +551,9 @@ def draw(self, renderer):
551551
552552 if rcParams ['text.usetex' ]:
553553 for line , wh , x , y in info :
554+ if not np .isfinite (x ) or not np .isfinite (y ):
555+ continue
556+
554557 x = x + posx
555558 y = y + posy
556559 if renderer .flipy ():
@@ -566,6 +569,9 @@ def draw(self, renderer):
566569 self ._fontproperties , angle )
567570 else :
568571 for line , wh , x , y in info :
572+ if not np .isfinite (x ) or not np .isfinite (y ):
573+ continue
574+
569575 x = x + posx
570576 y = y + posy
571577 if renderer .flipy ():
@@ -974,6 +980,8 @@ def is_math_text(s):
974980 # Did we find an even number of non-escaped dollar signs?
975981 # If so, treat is as math text.
976982 if rcParams ['text.usetex' ]:
983+ if s == ' ' :
984+ s = r'\ '
977985 return s , 'TeX'
978986
979987 if cbook .is_math_text (s ):
You can’t perform that action at this time.
0 commit comments