matplotlib之极坐标系的极径网格线(rgrids)的显示刻度
matplotlib之极坐标系的极径网格线(rgrids)的显示刻度
#!/usr/bin/env python3
#-*- coding:utf-8 -*-
############################
#File Name: polar.py
#Author: frank
#Mail: frank0903@aliyun.com
#Created Time:2018-05-22 22:08:01
############################
import matplotlib.pyplot as plt
import numpy as np
import matplotlib as mpl zhfont = mpl.font_manager.FontProperties(fname='/usr/share/fonts/truetype/wqy/wqy-microhei.ttc') x = plt.subplot(111, polar=True) plt.figtext(0.52, 0.95, '默认rgrids', ha='center', size=20,fontproperties=zhfont)
plt.rgrids()
plt.savefig('default_rgrids.jpg')
plt.show() plt.figtext(0.52, 0.95, '指定radii', ha='center', size=20,fontproperties=zhfont)
plt.rgrids((0.25, 0.5, 1.0))
plt.savefig('specail_radii.jpg')
plt.show() plt.figtext(0.52, 0.95, '指定radii和labels', ha='center', size=20,fontproperties=zhfont)
plt.rgrids((0.25, 0.5, 1.0), ('a', 'b', 'c'))
plt.savefig('specail_radii_labels.jpg') plt.show()



matplotlib.pyplot.rgrids(*args, **kwargs)
Get or set the radial gridlines on a polar plot.
get or set 径向网格线
call signatures:
lines, labels = rgrids()
lines, labels = rgrids(radii, labels=None, angle=22.5, **kwargs)
When called with no arguments, rgrid() simply returns the tuple (lines, labels), where lines is an array of radial gridlines (Line2D instances) and labels is an array of tick labels (Text instances).
如果不带参数,那么使用默认的 极径 显示刻度
When called with arguments, the labels will appear at the specified radial distances and angles.
labels, if not None, is a len(radii) list of strings of the labels to use at each angle.
If labels is None, the rformatter will be used
如果指定 radii,那么将会以指定的 radii 显示极径刻度
如果指定radii和labels,那么极径刻度 会以指定的labels显示
angel 指定极轴偏移的角度。
matplotlib之极坐标系的极径网格线(rgrids)的显示刻度的更多相关文章
- matplotlib之极坐标系的极角网格线(thetagrids)的显示刻度
极坐标系的极角网格线(thetagrids)的显示刻度 #!/usr/bin/env python3 #-*- coding:utf-8 -*- ########################### ...
- matplotlib之创建极坐标系
#!/usr/bin/env python3 #-*- coding:utf-8 -*- ############################ #File Name: polar.py #Auth ...
- Python自学笔记——matplotlib极坐标.md
一.极坐标 在平面内取一个定点O,叫极点,引一条射线Ox,叫做极轴,再选定一个长度单位和角度的正方向(通常取逆时针方向).对于平面内任何一点M,用ρ表示线段OM的长度(有时也用r表示),θ表示从Ox到 ...
- 06. Matplotlib 2 |折线图| 柱状图| 堆叠图| 面积图| 填图| 饼图| 直方图| 散点图| 极坐标| 图箱型图
1.基本图表绘制 plt.plot() 图表类别:线形图.柱状图.密度图,以横纵坐标两个维度为主同时可延展出多种其他图表样式 plt.plot(kind='line', ax=None, figsiz ...
- matplotlib极坐标方法详解
一.极坐标 在平面内取一个定点O,叫极点,引一条射线Ox,叫做极轴,再选定一个长度单位和角度的正方向(通常取逆时针方向).对于平面内任何一点M,用ρ表示线段OM的长度(有时也用r表示),θ表示从Ox到 ...
- 图表绘制工具--Matplotlib 2
''' [课程3.] 基本图表绘制 plt.plot() 图表类别:线形图.柱状图.密度图,以横纵坐标两个维度为主 同时可延展出多种其他图表样式 plt.plot(kind='line', ax=No ...
- Python学习笔记四:主要图表
图表部分,很多要记忆的.以下来自于培训材料的记录. 但我个人觉得更重要的是要根据业务特点确定用什么样的图表,然后再去查具体的参数,光记住参数意义不是很大. import numpy as np imp ...
- matlab练习程序(螺线拟合)
这里待拟合的螺线我们选择阿基米德螺线,对数螺线类似. 螺线的笛卡尔坐标系方程为: 螺线从笛卡尔坐标转为极坐标方程为: 阿基米德螺线在极坐标系下极径r和极角theta为线性关系,方程为: 计 ...
- matplotlib基本函数
数据分析 matlab Numpy + scipy + pandas +matplotlib 数据计算 +科学应用+数据清洗+数据可视化 1 Numpy概述 1 基于c语言的python接口的数值算法 ...
随机推荐
- luci范例
转自:http://www.cnblogs.com/souroot/p/4511760.html LuCI (Lua Configiration Interface) 是OpenWRT 的Web 管理 ...
- Android内存优化12 内存泄漏常见情况3 注册泄漏
android 中有很多注册和反注册,由于在注册后,上下文自身会被持久化的观察者列表所持有,如果不进行反注册,就会造成内存泄漏 内存泄漏1:Sensor Manager 代码如下: MainActiv ...
- 用python生成基于lombok 和 hibernate 生成javabean
mysql工具类 import pymysql.cursors import sys from contextlib import contextmanager import traceback im ...
- latex 三个不同的图放在一行且每个图都有注释
\begin{figure}[htbp] \begin{minipage}[t]{0.3\linewidth} \centering \includegraphics[width=.2.0.eps} ...
- [NS2]TCL语言基本语法
(来自:<NS2仿真实验-多媒体和无线网络通信>) 1. 变量(Variable)和变量替换(Variable Substitution) tcl变量是在第一次使用set的指令来指派变量的 ...
- Android avd XDM authorization key matches an existing client
在启动 android avd 调试程序的时候,突然出现这个错误; XDM authorization key matches an existing client avd 怎么也启动不起来.网上搜也 ...
- redis学习笔记——RDB和AOF持久化二
上一篇对RDB的源码分析是比较多的,但是AOF持久化执行进行了一些理论上的分析和概念的说明.本来想自己偷一些懒,将上篇文章中最后所给链接的AOF实现代码随便过一过算了,后来也就是在过的过程中发现自己这 ...
- 获取ping的最短、最长、平均时间
# -*- coding: utf-8 -*- import osimport rep = os.popen('ping 120.26.77.101') out = p.read()regex = r ...
- WindowManager.LayoutParams全解
WindowManager是Android中一个重要的服务(Service ).WindowManager Service 是全局的,是唯一的.它将用户的操作,翻译成为指令,发送给呈现在界面上的各个W ...
- codeforces C. Diverse Permutation
C. Diverse Permutation time limit per test 1 second memory limit per test 256 megabytes input standa ...