文章
2976
标签
100
分类
63
首页
时间轴
标签
分类
知识库
关于
友链
Estom的博客
index
返回首页
搜索
首页
时间轴
标签
分类
知识库
关于
友链
index
发表于
2020-09-26
|
更新于
2020-09-26
|
Python
|
总字数:
24
|
阅读时长:
1分钟
|
浏览量:
刻度、比例尺
这些示例介绍了如何在Matplotlib中处理不同的比例。
文章作者:
Estom
文章链接:
https://estom.github.io/2020/09/26/Python/matplotlab/gallery/scales/index/
版权声明:
本博客所有文章除特别声明外,均采用
CC BY-NC-SA 4.0
许可协议。转载请注明来源
Estom的博客
!
上一篇
log_bar
对数条形图绘制具有对数y轴的条形图。 12345678910111213141516171819202122import matplotlib.pyplot as pltimport numpy as npdata = ((3, 1000), (10, 3), (100, 30), (500, 800), (50, 1))dim = len(data[0])w = 0.75dimw = w / dimfig, ax = plt.subplots()x = np.arange(len(data))for i in range(len(data[0])): y = [d[i] for d in data] b = ax.bar(x + i * dimw, y, dimw, bottom=0.001)ax.set_xticks(x + dimw / 2, map(str, x))ax.set_yscale('log')ax.set_xlabel('x')ax.set_ylabel('y')plt.show() ...
下一篇
aspect_loglog
双对数 1234567891011121314151617181920import matplotlib.pyplot as pltfig, (ax1, ax2) = plt.subplots(1, 2)ax1.set_xscale("log")ax1.set_yscale("log")ax1.set_xlim(1e1, 1e3)ax1.set_ylim(1e2, 1e3)ax1.set_aspect(1)ax1.set_title("adjustable = box")ax2.set_xscale("log")ax2.set_yscale("log")ax2.set_adjustable("datalim")ax2.plot([1, 3, 10], [1, 9, 100], "o-")ax2.set_xlim(1e-1, 1e2)ax2.set_ylim(1e-1, 1e3)ax2.set_aspect(1)ax2.set_title(&q...
Estom
也许那年在绿色的麦浪中奔跑的时候,就注定了我此生的繁华与悲叹
文章
2976
标签
100
分类
63
关注
公告
欢迎参观Estom的小屋
目录
1.
刻度、比例尺
最新文章
自引用泛型概述
2025-12-21
02 集合底层结构
2025-12-18
11 Arrays和Collections
2025-12-18
06 JUC并发容器
2025-12-18
30 问题排查和性能优化指南
2025-09-14
搜索
数据加载中