@@ -461,12 +461,29 @@ def plot_to_fig(x_data,y_data,**kwargs):
461461 # print ("%s == %s" %(key, value))
462462
463463 plot_style = get_plot_style ("fds" )
464- plt .rcParams ["font.family" ] = plot_style ["Font_Name" ]
465- plt .rcParams ["font.size" ] = plot_style ["Label_Font_Size" ]
466- # print(plot_style)
467464
468- plt .rcParams ['text.usetex' ] = True # supports latex math (set per plot below)
469- plt .rcParams ["pdf.use14corefonts" ] = True # forces matplotlib to write native pdf fonts rather than embed
465+ import matplotlib .pyplot as plt
466+
467+ plt .rcParams .update ({
468+ "pdf.use14corefonts" : True ,
469+ "text.usetex" : False ,
470+
471+ # Text and math in Times New Roman
472+ "font.family" : "serif" ,
473+ "font.serif" : ["Times" , "Times New Roman" ],
474+
475+ "mathtext.fontset" : "custom" ,
476+ "mathtext.rm" : "Times" ,
477+ "mathtext.it" : "Times New Roman:italic" ,
478+ "mathtext.bf" : "Times:bold" ,
479+ "mathtext.cal" : "Times New Roman:italic" ,
480+ "mathtext.tt" : "Courier New" ,
481+ "mathtext.default" : "it" ,
482+
483+ "axes.unicode_minus" : False ,
484+ "pdf.compression" : 9 ,
485+ })
486+
470487 import logging
471488 # Suppress just the 'findfont' warnings from matplotlib's font manager
472489 logging .getLogger ('matplotlib.font_manager' ).setLevel (logging .ERROR )
0 commit comments