当前位置:网站首页>positioner
positioner
2022-04-23 17:58:00 【Feng Ye 520】
import matplotlib.pyplot as mp
import numpy as np
mp.figure(facecolor='lightgray')
locators = [
'mp.NullLocator()',
'mp.MaxNLocator(nbins=3,steps=[1,3,5,7,9])',
'mp.FixedLocator(locs=[0,2.5,5,7.5,10])',
'mp.AutoLocator()',
'mp.IndexLocator(offset=0.5,base=1.5)',
'mp.MultipleLocator()',
'mp.LinearLocator(numticks=6)',
'mp.LogLocator(base=2,subs=[1.0])'
]
n_locators = len(locators)
for i, locator in enumerate(locators):
mp.subplot(n_locators, 1, i + 1)
mp.xlim(0, 10)
mp.ylim(-1, 1)
mp.yticks(())
ax = mp.gca()
ax.spines['left'].set_color('none')
ax.spines['top'].set_color('none')
ax.spines['right'].set_color('none')
ax.spines['bottom'].set_position(('data', 0))
ax.xaxis.set_major_locator(eval(locator))
ax.xaxis.set_minor_locator(mp.MultipleLocator(0.1))
mp.plot(np.arange(11), np.zeros(11), c='none')
mp.text(5, 0.3, locator[3:], ha='center', size=12)
mp.tight_layout()
mp.show()
# Running results :
版权声明
本文为[Feng Ye 520]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230546134331.html
边栏推荐
- C1小笔记【任务训练篇一】
- 土地覆盖/利用数据产品下载
- EasymodbusTCP之clientexample解析
- Submit local warehouse and synchronize code cloud warehouse
- Build openstack platform
- Add animation to the picture under V-for timing
- 1217_ Generating target files using scons
- 2022年上海市安全员C证操作证考试题库及模拟考试
- JS parsing and execution process
- JS get link? The following parameter name or value, according to the URL? Judge the parameters after
猜你喜欢
Operators in C language
102. Sequence traversal of binary tree
Tell the truth of TS
On the method of outputting the complete name of typeID from GCC
C1 notes [task training chapter I]
.104History
Halo open source project learning (II): entity classes and data tables
C# 的数据流加密与解密
cv_ Solution of mismatch between bridge and opencv
[UDS unified diagnostic service] v. diagnostic application example: Flash bootloader
随机推荐
MySQL advanced index [classification, performance analysis, use, design principles]
Random number generation of C #
Operators in C language
MySQL_ 01_ Simple data retrieval
Go file operation
Data stream encryption and decryption of C
31. Next arrangement
C# 的数据流加密与解密
Classification of cifar100 data set based on convolutional neural network
C byte array (byte []) and string are converted to each other
C#字节数组(byte[])和字符串相互转换
Build openstack platform
Logic regression principle and code implementation
2022 Jiangxi energy storage technology exhibition, China Battery exhibition, power battery exhibition and fuel cell Exhibition
Auto.js 自定义对话框
Open source key component multi_ Button use, including test engineering
Hcip fifth experiment
2022年流动式起重机司机国家题库模拟考试平台操作
土地覆盖/利用数据产品下载
Kubernetes service discovery monitoring endpoints