@@ -158,7 +158,7 @@ def plot(self, backend="matplotlib", show=True, savefig=False, layers=None):
158158 elif backend == "plotly" :
159159 self .plot_plotly (show = show , savefig = savefig )
160160
161- def plot_matplotlib (self , show = True , savefig = False , layers = None ):
161+ def plot_matplotlib (self , show = True , savefig = False , layers = None , usetex = False ):
162162 """
163163 Generate and optionally display the subplots.
164164
@@ -167,7 +167,7 @@ def plot_matplotlib(self, show=True, savefig=False, layers=None):
167167 show (bool): Whether to display the plot.
168168 """
169169
170- tex_fonts = plt_utils .setup_tex_fonts (fontsize = self .fontsize )
170+ tex_fonts = plt_utils .setup_tex_fonts (fontsize = self .fontsize , usetex = usetex )
171171
172172 plt_utils .setup_plotstyle (
173173 tex_fonts = tex_fonts ,
@@ -210,7 +210,7 @@ def plot_matplotlib(self, show=True, savefig=False, layers=None):
210210 # plt.close()
211211 return fig , axes
212212
213- def plot_plotly (self , show = True , savefig = None ):
213+ def plot_plotly (self , show = True , savefig = None , usetex = False ):
214214 """
215215 Generate and optionally display the subplots using Plotly.
216216
@@ -220,7 +220,8 @@ def plot_plotly(self, show=True, savefig=None):
220220 """
221221
222222 tex_fonts = plt_utils .setup_tex_fonts (
223- fontsize = self .fontsize
223+ fontsize = self .fontsize ,
224+ usetex = usetex ,
224225 ) # adjust or redefine for Plotly if needed
225226
226227 # Set default width and height if not specified
0 commit comments