weight = ['light', 'normal', 'medium', 'semibold', 'bold', 'heavy', 'black'] style = ['normal', 'italic', 'oblique'] size = ['xx-small', 'x-small', 'small', 'medium', 'large', 'x-large', 'xx-large'] cnames = { 'aliceblue': '#F0F8FF', 'antiquewhite': '#FAEBD...
import matplotlib.pyplot as plt # 创建一个图形 fig, ax = plt.subplots() # 添加第一个文本,设置字体大小为 12,粗细为 'bold' ax.text(0.5, 0.5, 'First Text', fontsize=12, fontweight='bold') # 添加第二个文本,设置字体大小为 14,粗细为 'normal' ax.text(0.5, 0.3, 'Second Text', ...
Feldman """ import matplotlib from matplotlib import pyplot from numpy import linspace, pi, sin matplotlib.rcParams['mathtext.fontset']= 'cm' # The following setting appears to effect tick labels only: matplotlib.rcParams['font.weight']= 'bold' fig= pyplot.figure(figsize=[8,7], dpi=120, ...
import matplotlib.pyplot as plt # 创建一个图形 fig, ax = plt.subplots() # 添加第一个文本,设置字体大小为 12,粗细为 'bold' ax.text(0.5, 0.5, 'First Text', fontsize=12, fontweight='bold') # 添加第二个文本,设置字体大小为 14,粗细为 'normal' ax.text(0.5, 0.3, 'Second Text', fon...