網站首頁 編程語言 正文
學術論文的圖繪制要求:
- 盡量清楚, 字體、曲線、標記盡量大
- 分辨率要求,最低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-07-08 python中的type,元類,類,對象用法_python
- 2022-10-22 BroadcastReceiver靜態注冊案例詳解_Android
- 2022-05-08 python函數裝飾器構造和參數傳遞_python
- 2022-05-22 Python數據結構之隊列詳解_python
- 2022-11-23 Python利用keyboard模塊實現鍵盤記錄操作_python
- 2022-05-18 python?turtle繪制多邊形和跳躍和改變速度特效_python
- 2022-07-26 TensorFlow使用keras報錯ImportError: cannot import name
- 2023-12-14 如何統計一個字符在字符串中出現次數
- 欄目分類
-
- 最近更新
-
- 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同步修改后的遠程分支