matplotlib-seaborn-曲线图

曲线图, tsplot 或者 lineplot

tsplot,
横轴数据:time
纵轴数据:all_acc
统计函数:默认的是均值  estimator=np.mean;中位数:estimator=np.median
使用估计量进行聚合时,定义要绘制的置信区间的大小。为“sd”时,专指绘制数据的标准偏差
color:线条颜色
linewidth:线条粗细

legend 参数:
loc: set legend position
labelspacing: 多个 legend space
ncol:定义 legend 列数
frameon: legend 是否有加边框
title: legend 标题
fontsize: legend 字体大小
handlelength:legend 整体大小
 

# 设置 figure 中字体属性类型,(自己电脑字体路径。设置中文字体必须设置这一项)
font = FontProperties(fname=r"C:\\WINDOWS\\Fonts\\msyhbd.ttf", size=9)
# 设置 figure 背景色
# sn.set_style('darkgrid')
sn.set_style('whitegrid')

 

# 设置 ylabel 内容,字体,fontproperties=font
ax1.set_ylabel('The balanced accuracy (%)', fontproperties=font)

 

# 定义 yticks 特殊坐标号
yticks_position = ['85', '90', '95', '100']
plt.yticks([0.85,0.90, 0.95, 1.0], yticks_position)

 

# 添加 legend ,呈现为希腊字符
legend_char = ["$\delta$", "$\\theta$", "$\\alpha$", "$\\beta$"]

 

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值