摘要: 阅读全文
posted @ 2023-11-29 21:49 Allen_Hao 阅读(24) 评论(0) 推荐(0)
摘要: savefig函数 Matplotlib中,savefig函数用于保存图形为文件。通过该函数,你可以将绘制的图形保存为常见的图像文件格式,如PNG、JPEG、SVG等。 matplotlib.pyplot.savefig(fname, dpi=None, bbox_inches='tight', p 阅读全文
posted @ 2023-11-29 21:40 Allen_Hao 阅读(1547) 评论(0) 推荐(0)
摘要: xlabel xlabel 函数用于为 Matplotlib 图表添加 x 轴的标签 xlabel 函数 matplotlib.pyplot.xlabel(xlabel, fontdict=None, labelpad=None, **kwargs) xlabel: 字符串,表示 x 轴标签的文本内 阅读全文
posted @ 2023-11-29 21:25 Allen_Hao 阅读(1829) 评论(0) 推荐(0)
摘要: matplotlib 中的 grid 函数用于在图表上添加网格线 grid 函数 matplotlib.pyplot.grid(b=None, which='major', axis='both', **kwargs) b: 布尔值,表示是否显示网格。如果为 True,则显示网格;如果为 False 阅读全文
posted @ 2023-11-29 20:56 Allen_Hao 阅读(359) 评论(0) 推荐(0)
摘要: matplotlib 中的 yticks 函数用于设置坐标轴的刻度和标签,包括位置和显示的文本标签。 matplotlib.pyplot.yticks(ticks=None, labels=None, **kwargs) ticks: 刻度位置,可以是一个列表或数组。 labels: 刻度对应的标签 阅读全文
posted @ 2023-11-29 20:41 Allen_Hao 阅读(282) 评论(0) 推荐(0)
摘要: matplotlib 中的 xticks 函数用于设置坐标轴的刻度和标签,包括位置和显示的文本标签。 matplotlib.pyplot.xticks(ticks=None, labels=None, **kwargs) ticks: 刻度位置,可以是一个列表或数组。 labels: 刻度对应的标签 阅读全文
posted @ 2023-11-29 20:22 Allen_Hao 阅读(69) 评论(0) 推荐(0)