zsh2270365028的个人博客分享 http://blog.sciencenet.cn/u/zsh2270365028

博文

[转载]matplotlib隐藏刻度线、标签和边线

已有 1275 次阅读 2022-2-16 16:40 |个人分类:Python|系统分类:科研笔记|文章来源:转载

refer to: https://blog.csdn.net/weixin_43326122/article/details/107292857

https://www.delftstack.com/zh/howto/matplotlib/how-to-hide-axis-text-ticks-and-or-tick-labels-in-matplotlib/

一般情况

在这里插入图片描述




以下ax默认由plt.gca()plt.subplots()获得

隐藏所有刻度线和标签

在这里插入图片描述

隐藏刻度线和标签

plt.yticks([])结果

隐藏刻度线

在这里插入图片描述

隐藏边线

在这里插入图片描述




https://m.sciencenet.cn/blog-587102-1325589.html

上一篇:arXiv-2022.2.5
下一篇:[转载]matplotlib隐藏刻度线、标签和边线

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...
扫一扫,分享此博文

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-5-16 03:18

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部