Answers for "matplotlib set default font"

1

matplotlib change font

from matplotlib import rc
font = {'size'   : 16}
matplotlib.rc('font', **font)

# change font
matplotlib.rcParams['font.sans-serif'] = "Arial"
matplotlib.rcParams['font.family'] = "sans-serif"
Posted by: Guest on July-01-2021
0

Changing default fonts in matploitlibrc file

''' The basic format of the file is in the form of "option : value". For example, to keep the
legend always on the right, we put:
legend.loc : right'''

''' to change the default fonts to Arial,
 search the file for fonts,then at that 
location, just add the following lines without # or ##'''.

font.family         : sans-serif
font.sans-serif     : Arial
Posted by: Guest on September-15-2021

Code answers related to "matplotlib set default font"

Python Answers by Framework

Browse Popular Code Answers by Language