当前位置:网站首页>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
边栏推荐
- Halo 开源项目学习(二):实体类与数据表
- Use of list - addition, deletion, modification and query
- C1 notes [task training chapter I]
- C1 notes [task training part 2]
- I/O多路复用及其相关详解
- Commonly used functions -- spineros:: and spineros::)
- Kubernetes service discovery monitoring endpoints
- Listen for click events other than an element
- ES6
- C byte array (byte []) and string are converted to each other
猜你喜欢

Client example analysis of easymodbustcp

Nat commun | current progress and open challenges of applied deep learning in Bioscience

2022 Jiangxi Photovoltaic Exhibition, China Distributed Photovoltaic Exhibition, Nanchang Solar Energy Utilization Exhibition

2022年广东省安全员A证第三批(主要负责人)特种作业证考试题库及在线模拟考试

Kubernetes service discovery monitoring endpoints

Welcome to the markdown editor

Go语言JSON包使用

JS get link? The following parameter name or value, according to the URL? Judge the parameters after

Leak detection and vacancy filling (6)

Dry goods | how to extract thumbnails quickly?
随机推荐
C1小笔记【任务训练篇一】
MySQL_01_简单数据检索
Halo 开源项目学习(二):实体类与数据表
C1小笔记【任务训练篇二】
31. Next arrangement
开源按键组件Multi_Button的使用,含测试工程
YOLOv4剪枝【附代码】
Comparison between xtask and kotlin coroutine
ROS package NMEA_ navsat_ Driver reads GPS and Beidou Positioning Information Notes
Vite configure proxy proxy to solve cross domain
列錶的使用-增删改查
列表的使用-增删改查
Eigen learning summary
I/O多路复用及其相关详解
2022年流动式起重机司机国家题库模拟考试平台操作
The JS timestamp of wechat applet is converted to / 1000 seconds. After six hours and one day, this Friday option calculates the time
Thirteen documents in software engineering
JS interview question: FN call. call. call. Call (FN2) parsing
Amount input box, used for recharge and withdrawal
Oil monkey website address