網站首頁 編程語言 正文
學術論文的圖繪制要求:
- 盡量清楚, 字體、曲線、標記盡量大
- 分辨率要求,最低dpi要求,例如dpi最低300
- 保存格式,例如pdf
- 無顏色印刷,需要標記來區分類別
演示實例:
font_size = 13 #字體大小
label_size = 11.5 #label
lw = 2 #線寬
font = fm.FontProperties(size=font_size)
for results in complet_results:
if results['mode'] == 'method1':
label = 'method1'
marker = 'o'
elif results['mode'] == 'method2':
label = 'method2'
marker = '+'
elif results['mode'] == 'method3':
label = 'method3'
marker = '*'
plt.plot(results['test_acc_global'], label=label, marker=marker, linewidth=lw)
# plt.title(data_name, fontsize=font_size)
plt.xlabel('Rounds', fontproperties=font)
plt.ylabel('Test Acc', fontproperties=font)
plt.grid() #可選
plt.xlim(0, 100) #x軸顯示范圍
plt.ylim(0.75, 0.91) #y軸顯示范圍
plt.legend(shadow=False, fontsize=font_size, loc=4) #圖例
plt.tick_params(labelsize=label_size) #刻度大小
save_path = os.path.join(save_dir, '{}_test_acc_detail'.format(data_name.replace(',', '_')))
plt.savefig(save_path+'.jpg' , dpi=300, bbox_inches='tight') #dpi
plt.savefig(save_path+'.pdf', bbox_inches='tight') #pdf
plt.show()
plt.close()
原文鏈接:https://blog.csdn.net/weixin_39589455/article/details/129649549
- 上一篇:沒有了
- 下一篇:沒有了
相關推薦
- 2022-11-16 docker-compose安裝及執行命令_docker
- 2022-08-16 C#?泛型List排序的實現_C#教程
- 2023-01-10 Flutter最小刷新范圍探索ValueListenableBuilder使用詳解_Android
- 2022-04-12 pandas讀取csv格式數據時header參數設置方法_python
- 2022-11-10 ?Python列表的切片取值詳解_python
- 2022-05-26 Android?Flutter實現3D動畫效果示例詳解_Android
- 2022-10-10 React路由組件三種傳參方式分析講解_React
- 2022-02-15 使用數組的sort方法完成項目中的排序功能(數組sort方法與chart圖表展示結合)
- 欄目分類
-
- 最近更新
-
- window11 系統安裝 yarn
- 超詳細win安裝深度學習環境2025年最新版(
- Linux 中運行的top命令 怎么退出?
- MySQL 中decimal 的用法? 存儲小
- get 、set 、toString 方法的使
- @Resource和 @Autowired注解
- Java基礎操作-- 運算符,流程控制 Flo
- 1. Int 和Integer 的區別,Jav
- spring @retryable不生效的一種
- Spring Security之認證信息的處理
- Spring Security之認證過濾器
- Spring Security概述快速入門
- Spring Security之配置體系
- 【SpringBoot】SpringCache
- Spring Security之基于方法配置權
- redisson分布式鎖中waittime的設
- maven:解決release錯誤:Artif
- restTemplate使用總結
- Spring Security之安全異常處理
- MybatisPlus優雅實現加密?
- Spring ioc容器與Bean的生命周期。
- 【探索SpringCloud】服務發現-Nac
- Spring Security之基于HttpR
- Redis 底層數據結構-簡單動態字符串(SD
- arthas操作spring被代理目標對象命令
- Spring中的單例模式應用詳解
- 聊聊消息隊列,發送消息的4種方式
- bootspring第三方資源配置管理
- GIT同步修改后的遠程分支