@@ -58,7 +58,7 @@ def __init__(self, output):
58
58
{"path" : "vector" , "agg" : "raster" , "macosx" : "raster" },
59
59
output = output .lower ())
60
60
61
- def parse (self , s , dpi = 72 , prop = None ):
61
+ def parse (self , s , dpi = 72 , prop = None , antialiased = None ):
62
62
"""
63
63
Parse the given math expression *s* at the given *dpi*. If *prop* is
64
64
provided, it is a `.FontProperties` object specifying the "default"
@@ -74,10 +74,10 @@ def parse(self, s, dpi=72, prop=None):
74
74
# is mutable; key the cache using an internal copy (see
75
75
# text._get_text_metrics_with_cache for a similar case).
76
76
prop = prop .copy () if prop is not None else None
77
- return self ._parse_cached (s , dpi , prop )
77
+ return self ._parse_cached (s , dpi , prop , antialiased )
78
78
79
79
@functools .lru_cache (50 )
80
- def _parse_cached (self , s , dpi , prop ):
80
+ def _parse_cached (self , s , dpi , prop , antialiased ):
81
81
from matplotlib .backends import backend_agg
82
82
83
83
if prop is None :
@@ -100,7 +100,7 @@ def _parse_cached(self, s, dpi, prop):
100
100
if self ._output_type == "vector" :
101
101
return output .to_vector ()
102
102
elif self ._output_type == "raster" :
103
- return output .to_raster ()
103
+ return output .to_raster (antialiased = antialiased )
104
104
105
105
106
106
def math_to_image (s , filename_or_obj , prop = None , dpi = None , format = None ,
0 commit comments