当前位置: 首页 > news >正文

网站建设方案 报价计算机培训班有用吗

网站建设方案 报价,计算机培训班有用吗,泰安公司注册,广告公司名称取名matplotlib 的默认字体和默认字体系列 查看默认字体和默认字体系列查看默认字体系列下包含的字体查看 plt.rcParams 设置的所有参数查看所有支持的字体格式设置默认字体方法1:方法2 今天给大家介绍一下 matplotlib 包中的默认字体以及默认字体系列。 查看默认字体和…

matplotlib 的默认字体和默认字体系列

  • 查看默认字体和默认字体系列
  • 查看默认字体系列下包含的字体
  • 查看 plt.rcParams 设置的所有参数
  • 查看所有支持的字体格式
  • 设置默认字体
    • 方法1:
    • 方法2

今天给大家介绍一下 matplotlib 包中的默认字体以及默认字体系列。

查看默认字体和默认字体系列

使用如下代码我们就可以轻松获取到默认字体与默认字体系列:

import matplotlib.pyplot as pltprint(plt.rcParams["font.family"][0])
print(plt.rcParams["font.sans-serif"][0])
"""
result:
sans-serif
DejaVu Sans
"""

查看默认字体系列下包含的字体

我们知道,默认字体系列有 'serif', 'sans-serif', 'monospace', 'fantasy' or 'cursive',我们可以使用如下代码查看其系列下包含的字体。

import matplotlib.pyplot as pltprint(plt.rcParams["font.sans-serif"])
"""
result:
['DejaVu Sans', 'Bitstream Vera Sans', 'Computer Modern Sans Serif', 'Lucida Grande', 'Verdana', 'Geneva', 'Lucid', 'Arial', 'Helvetica', 'Avant Garde', 'sans-serif']
"""

其他字体系列下的字体可以替换 font.sans-serif 为其他的字体系列名称即可。

查看 plt.rcParams 设置的所有参数

import matplotlib.pyplot as pltprint(plt.rcParams.keys())
"""
result:
KeysView(RcParams({'_internal.classic_mode': False,'agg.path.chunksize': 0,'animation.bitrate': -1,'animation.codec': 'h264','animation.convert_args': ['-layers', 'OptimizePlus'],'animation.convert_path': 'convert','animation.embed_limit': 20.0,'animation.ffmpeg_args': [],'animation.ffmpeg_path': 'ffmpeg','animation.frame_format': 'png','animation.html': 'none','animation.writer': 'ffmpeg','axes.autolimit_mode': 'data','axes.axisbelow': 'line','axes.edgecolor': 'black','axes.facecolor': 'white','axes.formatter.limits': [-5, 6],'axes.formatter.min_exponent': 0,'axes.formatter.offset_threshold': 4,'axes.formatter.use_locale': False,'axes.formatter.use_mathtext': False,'axes.formatter.useoffset': True,'axes.grid': False,'axes.grid.axis': 'both','axes.grid.which': 'major','axes.labelcolor': 'black','axes.labelpad': 4.0,'axes.labelsize': 'medium','axes.labelweight': 'normal','axes.linewidth': 0.8,'axes.prop_cycle': cycler('color', ['#1f77b4', '#ff7f0e', '#2ca02c', '#d62728', '#9467bd', '#8c564b', '#e377c2', '#7f7f7f', '#bcbd22', '#17becf']),'axes.spines.bottom': True,'axes.spines.left': True,'axes.spines.right': True,'axes.spines.top': True,'axes.titlecolor': 'auto','axes.titlelocation': 'center','axes.titlepad': 6.0,'axes.titlesize': 'large','axes.titleweight': 'normal','axes.titley': None,'axes.unicode_minus': True,'axes.xmargin': 0.05,'axes.ymargin': 0.05,'axes.zmargin': 0.05,'axes3d.grid': True,'axes3d.xaxis.panecolor': (0.95, 0.95, 0.95, 0.5),'axes3d.yaxis.panecolor': (0.9, 0.9, 0.9, 0.5),'axes3d.zaxis.panecolor': (0.925, 0.925, 0.925, 0.5),'backend': 'QtAgg','backend_fallback': True,'boxplot.bootstrap': None,'boxplot.boxprops.color': 'black','boxplot.boxprops.linestyle': '-','boxplot.boxprops.linewidth': 1.0,'boxplot.capprops.color': 'black','boxplot.capprops.linestyle': '-','boxplot.capprops.linewidth': 1.0,'boxplot.flierprops.color': 'black','boxplot.flierprops.linestyle': 'none','boxplot.flierprops.linewidth': 1.0,'boxplot.flierprops.marker': 'o','boxplot.flierprops.markeredgecolor': 'black','boxplot.flierprops.markeredgewidth': 1.0,'boxplot.flierprops.markerfacecolor': 'none','boxplot.flierprops.markersize': 6.0,'boxplot.meanline': False,'boxplot.meanprops.color': 'C2','boxplot.meanprops.linestyle': '--','boxplot.meanprops.linewidth': 1.0,'boxplot.meanprops.marker': '^','boxplot.meanprops.markeredgecolor': 'C2','boxplot.meanprops.markerfacecolor': 'C2','boxplot.meanprops.markersize': 6.0,'boxplot.medianprops.color': 'C1','boxplot.medianprops.linestyle': '-','boxplot.medianprops.linewidth': 1.0,'boxplot.notch': False,'boxplot.patchartist': False,'boxplot.showbox': True,'boxplot.showcaps': True,'boxplot.showfliers': True,'boxplot.showmeans': False,'boxplot.vertical': True,'boxplot.whiskerprops.color': 'black','boxplot.whiskerprops.linestyle': '-','boxplot.whiskerprops.linewidth': 1.0,'boxplot.whiskers': 1.5,'contour.algorithm': 'mpl2014','contour.corner_mask': True,'contour.linewidth': None,'contour.negative_linestyle': 'dashed','date.autoformatter.day': '%Y-%m-%d','date.autoformatter.hour': '%m-%d %H','date.autoformatter.microsecond': '%M:%S.%f','date.autoformatter.minute': '%d %H:%M','date.autoformatter.month': '%Y-%m','date.autoformatter.second': '%H:%M:%S','date.autoformatter.year': '%Y','date.converter': 'auto','date.epoch': '1970-01-01T00:00:00','date.interval_multiples': True,'docstring.hardcopy': False,'errorbar.capsize': 0.0,'figure.autolayout': False,'figure.constrained_layout.h_pad': 0.04167,'figure.constrained_layout.hspace': 0.02,'figure.constrained_layout.use': False,'figure.constrained_layout.w_pad': 0.04167,'figure.constrained_layout.wspace': 0.02,'figure.dpi': 100.0,'figure.edgecolor': 'white','figure.facecolor': 'white','figure.figsize': [6.4, 4.8],'figure.frameon': True,'figure.hooks': [],'figure.labelsize': 'large','figure.labelweight': 'normal','figure.max_open_warning': 20,'figure.raise_window': True,'figure.subplot.bottom': 0.11,'figure.subplot.hspace': 0.2,'figure.subplot.left': 0.125,'figure.subplot.right': 0.9,'figure.subplot.top': 0.88,'figure.subplot.wspace': 0.2,'figure.titlesize': 'large','figure.titleweight': 'normal','font.cursive': ['Apple Chancery','Textile','Zapf Chancery','Sand','Script MT','Felipa','Comic Neue','Comic Sans MS','cursive'],'font.family': ['sans-serif'],'font.fantasy': ['Chicago','Charcoal','Impact','Western','Humor Sans','xkcd','fantasy'],'font.monospace': ['DejaVu Sans Mono','Bitstream Vera Sans Mono','Computer Modern Typewriter','Andale Mono','Nimbus Mono L','Courier New','Courier','Fixed','Terminal','monospace'],'font.sans-serif': ['DejaVu Sans','Bitstream Vera Sans','Computer Modern Sans Serif','Lucida Grande','Verdana','Geneva','Lucid','Arial','Helvetica','Avant Garde','sans-serif'],'font.serif': ['DejaVu Serif','Bitstream Vera Serif','Computer Modern Roman','New Century Schoolbook','Century Schoolbook L','Utopia','ITC Bookman','Bookman','Nimbus Roman No9 L','Times New Roman','Times','Palatino','Charter','serif'],'font.size': 10.0,'font.stretch': 'normal','font.style': 'normal','font.variant': 'normal','font.weight': 'normal','grid.alpha': 1.0,'grid.color': '#b0b0b0','grid.linestyle': '-','grid.linewidth': 0.8,'hatch.color': 'black','hatch.linewidth': 1.0,'hist.bins': 10,'image.aspect': 'equal','image.cmap': 'viridis','image.composite_image': True,'image.interpolation': 'antialiased','image.lut': 256,'image.origin': 'upper','image.resample': True,'interactive': False,'keymap.back': ['left', 'c', 'backspace', 'MouseButton.BACK'],'keymap.copy': ['ctrl+c', 'cmd+c'],'keymap.forward': ['right', 'v', 'MouseButton.FORWARD'],'keymap.fullscreen': ['f', 'ctrl+f'],'keymap.grid': ['g'],'keymap.grid_minor': ['G'],'keymap.help': ['f1'],'keymap.home': ['h', 'r', 'home'],'keymap.pan': ['p'],'keymap.quit': ['ctrl+w', 'cmd+w', 'q'],'keymap.quit_all': [],'keymap.save': ['s', 'ctrl+s'],'keymap.xscale': ['k', 'L'],'keymap.yscale': ['l'],'keymap.zoom': ['o'],'legend.borderaxespad': 0.5,'legend.borderpad': 0.4,'legend.columnspacing': 2.0,'legend.edgecolor': '0.8','legend.facecolor': 'inherit','legend.fancybox': True,'legend.fontsize': 'medium','legend.framealpha': 0.8,'legend.frameon': True,'legend.handleheight': 0.7,'legend.handlelength': 2.0,'legend.handletextpad': 0.8,'legend.labelcolor': 'None','legend.labelspacing': 0.5,'legend.loc': 'best','legend.markerscale': 1.0,'legend.numpoints': 1,'legend.scatterpoints': 1,'legend.shadow': False,'legend.title_fontsize': None,'lines.antialiased': True,'lines.color': 'C0','lines.dash_capstyle': <CapStyle.butt: 'butt'>,'lines.dash_joinstyle': <JoinStyle.round: 'round'>,'lines.dashdot_pattern': [6.4, 1.6, 1.0, 1.6],'lines.dashed_pattern': [3.7, 1.6],'lines.dotted_pattern': [1.0, 1.65],'lines.linestyle': '-','lines.linewidth': 1.5,'lines.marker': 'None','lines.markeredgecolor': 'auto','lines.markeredgewidth': 1.0,'lines.markerfacecolor': 'auto','lines.markersize': 6.0,'lines.scale_dashes': True,'lines.solid_capstyle': <CapStyle.projecting: 'projecting'>,'lines.solid_joinstyle': <JoinStyle.round: 'round'>,'markers.fillstyle': 'full','mathtext.bf': 'sans:bold','mathtext.cal': 'cursive','mathtext.default': 'it','mathtext.fallback': 'cm','mathtext.fontset': 'dejavusans','mathtext.it': 'sans:italic','mathtext.rm': 'sans','mathtext.sf': 'sans','mathtext.tt': 'monospace','patch.antialiased': True,'patch.edgecolor': 'black','patch.facecolor': 'C0','patch.force_edgecolor': False,'patch.linewidth': 1.0,'path.effects': [],'path.simplify': True,'path.simplify_threshold': 0.111111111111,'path.sketch': None,'path.snap': True,'pcolor.shading': 'auto','pcolormesh.snap': True,'pdf.compression': 6,'pdf.fonttype': 3,'pdf.inheritcolor': False,'pdf.use14corefonts': False,'pgf.preamble': '','pgf.rcfonts': True,'pgf.texsystem': 'xelatex','polaraxes.grid': True,'ps.distiller.res': 6000,'ps.fonttype': 3,'ps.papersize': 'letter','ps.useafm': False,'ps.usedistiller': None,'savefig.bbox': None,'savefig.directory': '~','savefig.dpi': 'figure','savefig.edgecolor': 'auto','savefig.facecolor': 'auto','savefig.format': 'png','savefig.orientation': 'portrait','savefig.pad_inches': 0.1,'savefig.transparent': False,'scatter.edgecolors': 'face','scatter.marker': 'o','svg.fonttype': 'path','svg.hashsalt': None,'svg.image_inline': True,'text.antialiased': True,'text.color': 'black','text.hinting': 'force_autohint','text.hinting_factor': 8,'text.kerning_factor': 0,'text.latex.preamble': '','text.parse_math': True,'text.usetex': False,'timezone': 'UTC','tk.window_focus': False,'toolbar': 'toolbar2','webagg.address': '127.0.0.1','webagg.open_in_browser': True,'webagg.port': 8988,'webagg.port_retries': 50,'xaxis.labellocation': 'center','xtick.alignment': 'center','xtick.bottom': True,'xtick.color': 'black','xtick.direction': 'out','xtick.labelbottom': True,'xtick.labelcolor': 'inherit','xtick.labelsize': 'medium','xtick.labeltop': False,'xtick.major.bottom': True,'xtick.major.pad': 3.5,'xtick.major.size': 3.5,'xtick.major.top': True,'xtick.major.width': 0.8,'xtick.minor.bottom': True,'xtick.minor.pad': 3.4,'xtick.minor.size': 2.0,'xtick.minor.top': True,'xtick.minor.visible': False,'xtick.minor.width': 0.6,'xtick.top': False,'yaxis.labellocation': 'center','ytick.alignment': 'center_baseline','ytick.color': 'black','ytick.direction': 'out','ytick.labelcolor': 'inherit','ytick.labelleft': True,'ytick.labelright': False,'ytick.labelsize': 'medium','ytick.left': True,'ytick.major.left': True,'ytick.major.pad': 3.5,'ytick.major.right': True,'ytick.major.size': 3.5,'ytick.major.width': 0.8,'ytick.minor.left': True,'ytick.minor.pad': 3.4,'ytick.minor.right': True,'ytick.minor.size': 2.0,'ytick.minor.visible': False,'ytick.minor.width': 0.6,'ytick.right': False}))
"""

查看所有支持的字体格式

那么如何查看matplotlib 支持的所有字体呢?可以使用如下代码:

import matplotliba = sorted([f.name for f in matplotlib.font_manager.fontManager.ttflist])
for i in a:print(i)
"""
result:
Academy Engraved LET
Academy Engraved LET
Adobe Arabic
Adobe Arabic
Adobe Arabic
Adobe Arabic
Adobe Arabic
Adobe Arabic
Adobe Arabic
Adobe Arabic
Adobe Caslon Pro
Adobe Caslon Pro
Adobe Caslon Pro
Adobe Caslon Pro
Adobe Caslon Pro
Adobe Caslon Pro
Adobe Caslon Pro
Adobe Caslon Pro
Adobe Caslon Pro
Adobe Caslon Pro
Adobe Caslon Pro
Adobe Caslon Pro
Adobe Devanagari
Adobe Devanagari
Adobe Devanagari
Adobe Devanagari
Adobe Devanagari
Adobe Devanagari
Adobe Devanagari
Adobe Devanagari
Adobe Fan Heiti Std
Adobe Fan Heiti Std
Adobe Fangsong Std
Adobe Fangsong Std
Adobe Garamond Pro
Adobe Garamond Pro
Adobe Garamond Pro
Adobe Garamond Pro
Adobe Garamond Pro
Adobe Garamond Pro
Adobe Garamond Pro
Adobe Garamond Pro
Adobe Gothic Std
Adobe Gothic Std
Adobe Hebrew
Adobe Hebrew
Adobe Hebrew
Adobe Hebrew
Adobe Hebrew
Adobe Hebrew
Adobe Hebrew
Adobe Hebrew
Adobe Heiti Std
Adobe Heiti Std
Adobe Kaiti Std
Adobe Kaiti Std
Adobe Ming Std
Adobe Ming Std
Adobe Myungjo Std
Adobe Myungjo Std
Adobe Naskh
Adobe Naskh
Adobe Song Std
Adobe Song Std
Arial
Arial
Arial
Arial
Arial
Arial
Arial
Arial
Arial
Arial
Bahnschrift
Bahnschrift
Birch Std
Birch Std
Blackletter686 BT
Blackletter686 BT
Blackoak Std
Blackoak Std
Broadway BT
Broadway BT
Brush Script Std
Brush Script Std
Calibri
Calibri
Calibri
Calibri
Calibri
Calibri
Calibri
Calibri
Calibri
Calibri
Calibri
Calibri
Calligraph421 BT
Calligraph421 BT
Cambria
Cambria
Cambria
Cambria
Cambria
Cambria
Cambria
Cambria
Candara
Candara
Candara
Candara
Candara
Candara
Candara
Candara
Candara
Candara
Candara
Candara
Cataneo BT
Cataneo BT
Chaparral Pro
Chaparral Pro
Chaparral Pro
Chaparral Pro
Chaparral Pro
Chaparral Pro
Chaparral Pro
Chaparral Pro
Chaparral Pro
Chaparral Pro
Charlemagne Std
Charlemagne Std
Comic Sans MS
Comic Sans MS
Comic Sans MS
Comic Sans MS
Comic Sans MS
Comic Sans MS
Comic Sans MS
Comic Sans MS
Consolas
Consolas
Consolas
Consolas
Consolas
Consolas
Consolas
Consolas
Constantia
Constantia
Constantia
Constantia
Constantia
Constantia
Constantia
Constantia
Cooper Std
Cooper Std
Cooper Std
Cooper Std
Corbel
Corbel
Corbel
Corbel
Corbel
Corbel
Corbel
Corbel
Corbel
Corbel
Corbel
Corbel
Courier New
Courier New
Courier New
Courier New
Courier New
Courier New
Courier New
Courier New
DFPHaiBaoW12-GB
DejaVu Sans
DejaVu Sans
DejaVu Sans
DejaVu Sans
DejaVu Sans Display
DejaVu Sans Mono
DejaVu Sans Mono
DejaVu Sans Mono
DejaVu Sans Mono
DejaVu Serif
DejaVu Serif
DejaVu Serif
DejaVu Serif
DejaVu Serif Display
DengXian
DengXian
DengXian
DengXian
DengXian
DengXian
Ebrima
Ebrima
Ebrima
Ebrima
FangSong
FangSong
Franklin Gothic Medium
Franklin Gothic Medium
Franklin Gothic Medium
Franklin Gothic Medium
Gabriola
Gabriola
Gadugi
Gadugi
Gadugi
Gadugi
Georgia
Georgia
Georgia
Georgia
Georgia
Georgia
Georgia
Georgia
Giddyup Std
Giddyup Std
Highlight LET
Highlight LET
Hobo Std
Hobo Std
HolidayPi BT
HolidayPi BT
HoloLens MDL2 Assets
HoloLens MDL2 Assets
Impact
Impact
Ink Free
Ink Free
Javanese Text
Javanese Text
John Handy LET
John Handy LET
Jokerman LET
Jokerman LET
KaiTi
KaiTi
Kozuka Gothic Pr6N
Kozuka Gothic Pr6N
Kozuka Gothic Pr6N
Kozuka Gothic Pr6N
Kozuka Gothic Pr6N
Kozuka Gothic Pr6N
Kozuka Gothic Pr6N
Kozuka Gothic Pr6N
Kozuka Gothic Pr6N
Kozuka Gothic Pr6N
Kozuka Gothic Pr6N
Kozuka Gothic Pr6N
Kozuka Gothic Pro
Kozuka Gothic Pro
Kozuka Gothic Pro
Kozuka Gothic Pro
Kozuka Gothic Pro
Kozuka Gothic Pro
Kozuka Gothic Pro
Kozuka Gothic Pro
Kozuka Gothic Pro
Kozuka Gothic Pro
Kozuka Gothic Pro
Kozuka Gothic Pro
Kozuka Mincho Pr6N
Kozuka Mincho Pr6N
Kozuka Mincho Pr6N
Kozuka Mincho Pr6N
Kozuka Mincho Pr6N
Kozuka Mincho Pr6N
Kozuka Mincho Pr6N
Kozuka Mincho Pr6N
Kozuka Mincho Pr6N
Kozuka Mincho Pr6N
Kozuka Mincho Pr6N
Kozuka Mincho Pr6N
Kozuka Mincho Pro
Kozuka Mincho Pro
Kozuka Mincho Pro
Kozuka Mincho Pro
Kozuka Mincho Pro
Kozuka Mincho Pro
Kozuka Mincho Pro
Kozuka Mincho Pro
Kozuka Mincho Pro
Kozuka Mincho Pro
Kozuka Mincho Pro
Kozuka Mincho Pro
La Bamba LET
La Bamba LET
Leelawadee UI
Leelawadee UI
Leelawadee UI
Leelawadee UI
Leelawadee UI
Leelawadee UI
Letter Gothic Std
Letter Gothic Std
Letter Gothic Std
Letter Gothic Std
Letter Gothic Std
Letter Gothic Std
Letter Gothic Std
Letter Gothic Std
Lithos Pro
Lithos Pro
Lithos Pro
Lithos Pro
Lucida Console
Lucida Console
Lucida Sans Unicode
Lucida Sans Unicode
MS Gothic
MS Gothic
MT Extra
MV Boli
MV Boli
Malgun Gothic
Malgun Gothic
Malgun Gothic
Malgun Gothic
Malgun Gothic
Malgun Gothic
Marlett
Mekanik LET
Mekanik LET
Mesquite Std
Mesquite Std
Microsoft Himalaya
Microsoft Himalaya
Microsoft JhengHei
Microsoft JhengHei
Microsoft JhengHei
Microsoft JhengHei
Microsoft JhengHei
Microsoft JhengHei
Microsoft New Tai Lue
Microsoft New Tai Lue
Microsoft New Tai Lue
Microsoft New Tai Lue
Microsoft PhagsPa
Microsoft PhagsPa
Microsoft PhagsPa
Microsoft PhagsPa
Microsoft Sans Serif
Microsoft Sans Serif
Microsoft Tai Le
Microsoft Tai Le
Microsoft Tai Le
Microsoft Tai Le
Microsoft YaHei
Microsoft YaHei
Microsoft YaHei
Microsoft YaHei
Microsoft YaHei
Microsoft YaHei
Microsoft Yi Baiti
Microsoft Yi Baiti
Milano LET
Milano LET
MingLiU-ExtB
MingLiU-ExtB
Minion Pro
Minion Pro
Minion Pro
Minion Pro
Minion Pro
Minion Pro
Minion Pro
Minion Pro
Minion Pro
Minion Pro
Minion Pro
Minion Pro
Minion Pro
Minion Pro
Minion Pro
Minion Pro
Minion Pro
Minion Pro
Minion Pro
Minion Pro
MisterEarl BT
MisterEarl BT
Mongolian Baiti
Mongolian Baiti
Myanmar Text
Myanmar Text
Myanmar Text
Myanmar Text
Myriad Arabic
Myriad Arabic
Myriad Arabic
Myriad Arabic
Myriad Arabic
Myriad Arabic
Myriad Arabic
Myriad Arabic
Myriad Hebrew
Myriad Hebrew
Myriad Hebrew
Myriad Hebrew
Myriad Hebrew
Myriad Hebrew
Myriad Hebrew
Myriad Hebrew
Myriad Pro
Myriad Pro
Myriad Pro
Myriad Pro
Myriad Pro
Myriad Pro
Myriad Pro
Myriad Pro
Myriad Pro
Myriad Pro
Myriad Pro
Myriad Pro
Myriad Pro
Myriad Pro
Myriad Pro
Myriad Pro
Myriad Pro
Myriad Pro
Myriad Pro
Myriad Pro
Nirmala UI
Nirmala UI
Nirmala UI
Nirmala UI
Nirmala UI
Nirmala UI
Nueva Std
Nueva Std
Nueva Std
Nueva Std
Nueva Std
Nueva Std
Nueva Std
Nueva Std
Nueva Std
Nueva Std
Nueva Std
Nueva Std
OCR A Std
OCR A Std
Odessa LET
Odessa LET
OldDreadfulNo7 BT
OldDreadfulNo7 BT
One Stroke Script LET
One Stroke Script LET
Orange LET
Orange LET
Orator Std
Orator Std
Orator Std
Orator Std
Palatino Linotype
Palatino Linotype
Palatino Linotype
Palatino Linotype
Palatino Linotype
Palatino Linotype
Palatino Linotype
Palatino Linotype
ParkAvenue BT
ParkAvenue BT
Poplar Std
Poplar Std
Prestige Elite Std
Prestige Elite Std
Pump Demi Bold LET
Pump Demi Bold LET
Quixley LET
Quixley LET
Rage Italic LET
Rage Italic LET
Rosewood Std
Rosewood Std
Ruach LET
Ruach LET
STCaiyun
STIXGeneral
STIXGeneral
STIXGeneral
STIXGeneral
STIXNonUnicode
STIXNonUnicode
STIXNonUnicode
STIXNonUnicode
STIXSizeFiveSym
STIXSizeFourSym
STIXSizeFourSym
STIXSizeOneSym
STIXSizeOneSym
STIXSizeThreeSym
STIXSizeThreeSym
STIXSizeTwoSym
STIXSizeTwoSym
Scruff LET
Scruff LET
Segoe MDL2 Assets
Segoe MDL2 Assets
Segoe Print
Segoe Print
Segoe Print
Segoe Print
Segoe Script
Segoe Script
Segoe Script
Segoe Script
Segoe UI
Segoe UI
Segoe UI
Segoe UI
Segoe UI
Segoe UI
Segoe UI
Segoe UI
Segoe UI
Segoe UI
Segoe UI
Segoe UI
Segoe UI
Segoe UI
Segoe UI
Segoe UI
Segoe UI
Segoe UI
Segoe UI
Segoe UI
Segoe UI
Segoe UI
Segoe UI
Segoe UI
Segoe UI Emoji
Segoe UI Emoji
Segoe UI Historic
Segoe UI Historic
Segoe UI Symbol
Segoe UI Symbol
SimHei
SimHei
SimSun
SimSun
SimSun-ExtB
SimSun-ExtB
Sitka Small
Sitka Small
Sitka Small
Sitka Small
Sitka Small
Sitka Small
Sitka Small
Sitka Small
Smudger LET
Smudger LET
Square721 BT
Square721 BT
Staccato222 BT
Staccato222 BT
Stencil Std
Stencil Std
Sylfaen
Sylfaen
Symbol
Symbol
Tahoma
Tahoma
Tahoma
Tahoma
Tekton Pro
Tekton Pro
Tekton Pro
Tekton Pro
Tekton Pro
Tekton Pro
Tekton Pro
Tekton Pro
Times New Roman
Times New Roman
Times New Roman
Times New Roman
Times New Roman
Times New Roman
Times New Roman
Times New Roman
Tiranti Solid LET
Tiranti Solid LET
Trajan Pro
Trajan Pro
Trajan Pro
Trajan Pro
Trebuchet MS
Trebuchet MS
Trebuchet MS
Trebuchet MS
Trebuchet MS
Trebuchet MS
Trebuchet MS
Trebuchet MS
University Roman LET
University Roman LET
Verdana
Verdana
Verdana
Verdana
Verdana
Verdana
Verdana
Verdana
Victorian LET
Victorian LET
Webdings
Webdings
Westwood LET
Westwood LET
Wingdings
Wingdings
Yu Gothic
Yu Gothic
Yu Gothic
Yu Gothic
Yu Gothic
Yu Gothic
Yu Gothic
Yu Gothic
cmb10
cmex10
cmmi10
cmr10
cmss10
cmsy10
cmtt10
"""

设置默认字体

查看到了所有的字体格式,我们也可以设置使用自己喜欢的字体格式。

方法1:

import numpy as np
import matplotlib.pyplot as pltplt.rcParams['font.sans-serif'][0] = 'Lucida Grande'

方法2

import numpy as np
import matplotlib.pyplot as pltplt.rcParams['font.sans-serif'] = ['Lucida Grande', 'Tahoma', 'DejaVu Sans', 'Verdana']

当然也可以先设置字体系列,再设置字体系列中字体的顺序,将想要的字体放置在第一个位置

import numpy as np
import matplotlib.pyplot as pltplt.rcParams['font.family'] = 'sans-serif' # 默认字体系列,因此该行可以省略
plt.rcParams['font.sans-serif'] = ['Lucida Grande', 'Tahoma', 'DejaVu Sans', 'Verdana']

如果大家觉得有用,就点个赞让更多的人看到吧~


文章转载自:
http://dinncodrunk.ssfq.cn
http://dinncoyachtswoman.ssfq.cn
http://dinncohospodar.ssfq.cn
http://dinncoepicycle.ssfq.cn
http://dinncophotoactive.ssfq.cn
http://dinncocosign.ssfq.cn
http://dinncoprotogyny.ssfq.cn
http://dinncopicao.ssfq.cn
http://dinncoleftlaid.ssfq.cn
http://dinncosomatopleure.ssfq.cn
http://dinncotravois.ssfq.cn
http://dinncoceroplastic.ssfq.cn
http://dinncoimbosom.ssfq.cn
http://dinncocrabstick.ssfq.cn
http://dinncocos.ssfq.cn
http://dinncoapocynthion.ssfq.cn
http://dinncoczechic.ssfq.cn
http://dinncofluent.ssfq.cn
http://dinncosovietize.ssfq.cn
http://dinncosentience.ssfq.cn
http://dinncoserviceably.ssfq.cn
http://dinncoplay.ssfq.cn
http://dinncofungo.ssfq.cn
http://dinncohectostere.ssfq.cn
http://dinncopeek.ssfq.cn
http://dinncosegregationist.ssfq.cn
http://dinncopix.ssfq.cn
http://dinncodivisibility.ssfq.cn
http://dinncosuffolk.ssfq.cn
http://dinncoeligibility.ssfq.cn
http://dinncoupbear.ssfq.cn
http://dinncobraw.ssfq.cn
http://dinncoqueenless.ssfq.cn
http://dinncounderbrush.ssfq.cn
http://dinncokedge.ssfq.cn
http://dinncobecause.ssfq.cn
http://dinncosciuroid.ssfq.cn
http://dinncoanimalism.ssfq.cn
http://dinncoswipes.ssfq.cn
http://dinncocandid.ssfq.cn
http://dinncodvb.ssfq.cn
http://dinncospiky.ssfq.cn
http://dinncocline.ssfq.cn
http://dinncofeep.ssfq.cn
http://dinncomre.ssfq.cn
http://dinncopepita.ssfq.cn
http://dinncooverladen.ssfq.cn
http://dinncomicrostomatous.ssfq.cn
http://dinncozizith.ssfq.cn
http://dinncoovum.ssfq.cn
http://dinncoexcrescency.ssfq.cn
http://dinncobenet.ssfq.cn
http://dinncohorological.ssfq.cn
http://dinncothebes.ssfq.cn
http://dinncosiluroid.ssfq.cn
http://dinncosuperabundance.ssfq.cn
http://dinncoguisard.ssfq.cn
http://dinncokartell.ssfq.cn
http://dinncowernerite.ssfq.cn
http://dinncomatronymic.ssfq.cn
http://dinncoteletube.ssfq.cn
http://dinncoequivocate.ssfq.cn
http://dinncolegate.ssfq.cn
http://dinncovista.ssfq.cn
http://dinncorowan.ssfq.cn
http://dinncoshickered.ssfq.cn
http://dinncocitify.ssfq.cn
http://dinncotheropod.ssfq.cn
http://dinncomatriculation.ssfq.cn
http://dinncoelf.ssfq.cn
http://dinncoknuckleball.ssfq.cn
http://dinncominelayer.ssfq.cn
http://dinncorhapsody.ssfq.cn
http://dinncoundutiful.ssfq.cn
http://dinncomispronunciation.ssfq.cn
http://dinncoacupuncturist.ssfq.cn
http://dinncohypereutectic.ssfq.cn
http://dinncoduniwassal.ssfq.cn
http://dinncodemonetarize.ssfq.cn
http://dinncoworcestershire.ssfq.cn
http://dinncodeltoid.ssfq.cn
http://dinnconebular.ssfq.cn
http://dinncoperiderm.ssfq.cn
http://dinncotoken.ssfq.cn
http://dinncocornelian.ssfq.cn
http://dinncosatanology.ssfq.cn
http://dinncocarpool.ssfq.cn
http://dinncosubagency.ssfq.cn
http://dinncoabound.ssfq.cn
http://dinncoburgage.ssfq.cn
http://dinncospinozism.ssfq.cn
http://dinncocolorized.ssfq.cn
http://dinncoanthropoid.ssfq.cn
http://dinncojobber.ssfq.cn
http://dinncopussycat.ssfq.cn
http://dinncolinalool.ssfq.cn
http://dinncogalvanocautery.ssfq.cn
http://dinncorepresentability.ssfq.cn
http://dinncogrossness.ssfq.cn
http://dinncoirreformable.ssfq.cn
http://www.dinnco.com/news/75527.html

相关文章:

  • 个人域名 公司网站网络营销方案策划案例
  • 企业站群系统竞价托管收费标准
  • 海南百度网站建设附近的电脑培训班在哪里
  • 淘宝客网站名百度推广新手入门
  • 别的网站做相关链接怎么做长沙网站seo源头厂家
  • 深圳网站有哪些内容河北百度seo关键词
  • 怎么在网站上做视频百度应用下载安装
  • 盗版做的最好的网站登录注册入口
  • wordpress媒体库显示上海seo优化外包公司
  • 电子工程建设信息网站排名公式
  • 怎么做合买彩票网站什么是营销
  • 做竞价网站访问突然变少营销型网站建设公司价格
  • 软件开发用什么软件海淀区seo全面优化
  • 建立网站对吗免费网络营销软件
  • 建设美食网站的作用app开发费用一般多少钱
  • 兼职网站编程媒体:北京不再公布各区疫情数据
  • 网页qq邮箱登录惠州百度seo找谁
  • wordpress如何实现微信支付烟台seo关键词排名
  • 独立站建站详细步骤深圳网络推广招聘
  • 江苏加强政府网站内容建设管理办法网络营销策划总结
  • 定制公众号需要多少钱杭州网站优化公司哪家好
  • 游戏资讯网站怎么做大型网站seo课程
  • 上海建设银行网站转账记录查询今天合肥刚刚发生的重大新闻
  • 网站推广阶段好看的web网页
  • 网站建设公司的方案电商还有发展前景吗
  • 西安手机网站建设动力无限如何建立个人网站的步骤
  • 网站开发工期安排百度之家
  • 太原营销型网站建设制作怎么建立自己的企业网站
  • 织梦网站后台默认登陆路径网站设计是做什么的
  • 做图素材网站开通会员哪个好百度推广的价格表