如何向现有绘图添加图表中点的标记
How to add to an existing plot a marker for points in the chart
大家好,
我有一个包含多个函数的程序,它们都有 5-6 个固定点。在那些点上,我总是想要方形或菱形标记样式。我可以在程序中执行此操作,但我想将其包含在脚本中,以便在我 运行 程序时它们已经出现。有什么想法吗?
所以答案在这个网站上有很多描述。
https://bespokeblog.wordpress.com/2011/07/07/basic-data-plotting-with-matplotlib-part-2-lines-points-formatting/
基本上命令就是:
ax1f1.plot(x, y, marker='s', linestyle='-', color='k')
大家好, 我有一个包含多个函数的程序,它们都有 5-6 个固定点。在那些点上,我总是想要方形或菱形标记样式。我可以在程序中执行此操作,但我想将其包含在脚本中,以便在我 运行 程序时它们已经出现。有什么想法吗?
所以答案在这个网站上有很多描述。 https://bespokeblog.wordpress.com/2011/07/07/basic-data-plotting-with-matplotlib-part-2-lines-points-formatting/
基本上命令就是:
ax1f1.plot(x, y, marker='s', linestyle='-', color='k')