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

博文

[转载]python Log Axis

已有 954 次阅读 2022-2-17 15:45 |个人分类:Python|系统分类:科研笔记|文章来源:转载

refer to: https://matplotlib.org/stable/gallery/scales/log_test.html#sphx-glr-gallery-scales-log-test-py

This is an example of assigning a log-scale for the x-axis usingsemilogx.

This is an example of assigning a log-scale for the x-axis usingsemilogx.

log test

import matplotlib.pyplot as pltimport numpy as npfig, ax = plt.subplots()dt = 0.01t = np.arange(dt, 20.0, dt)ax.semilogx(t, np.exp(-t / 5.0))ax.grid()plt.show()




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

上一篇:[转载]matplotlib隐藏刻度线、标签和边线
下一篇:[转载]matplotlib修改坐标轴刻度值,刻度个数

0

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

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

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

GMT+8, 2024-5-16 02:08

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部