File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -551,6 +551,9 @@ def draw(self, renderer):
551
551
552
552
if rcParams ['text.usetex' ]:
553
553
for line , wh , x , y in info :
554
+ if not np .isfinite (x ) or not np .isfinite (y ):
555
+ continue
556
+
554
557
x = x + posx
555
558
y = y + posy
556
559
if renderer .flipy ():
@@ -566,6 +569,9 @@ def draw(self, renderer):
566
569
self ._fontproperties , angle )
567
570
else :
568
571
for line , wh , x , y in info :
572
+ if not np .isfinite (x ) or not np .isfinite (y ):
573
+ continue
574
+
569
575
x = x + posx
570
576
y = y + posy
571
577
if renderer .flipy ():
@@ -974,6 +980,8 @@ def is_math_text(s):
974
980
# Did we find an even number of non-escaped dollar signs?
975
981
# If so, treat is as math text.
976
982
if rcParams ['text.usetex' ]:
983
+ if s == ' ' :
984
+ s = r'\ '
977
985
return s , 'TeX'
978
986
979
987
if cbook .is_math_text (s ):
You can’t perform that action at this time.
0 commit comments