标记填充样式
Matplotlib中包含的标记填充样式的参考。
另请参阅 标记填充样式 和标记路径示例。

import numpy as npimport matplotlib.pyplot as pltfrom matplotlib.lines import Line2Dpoints = np.ones(5) # Draw 3 points for each linetext_style = dict(horizontalalignment='right', verticalalignment='center',fontsize=12, fontdict={'family': 'monospace'})marker_style = dict(color='cornflowerblue', linestyle=':', marker='o',markersize=15, markerfacecoloralt='gray')def format_axes(ax):ax.margins(0.2)ax.set_axis_off()fig, ax = plt.subplots()# Plot all fill styles.for y, fill_style in enumerate(Line2D.fillStyles):ax.text(-0.5, y, repr(fill_style), **text_style)ax.plot(y * points, fillstyle=fill_style, **marker_style)format_axes(ax)ax.set_title('fill style')plt.show()
