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接口的数值算法 ...
随机推荐
- WinCE6.0 2012年补丁下载地址
Windows CE6.0 2012年补丁包WinCEPB60-121231-Product-Update-Rollup-Armv4I.msi下载地址:http://www.microsoft.com ...
- Swift之单例模式
三种Swift实现单例模式的方法:全局变量,内部变量,dispatch_once方式 1. 全局变量 private let _singleton = Singleton() class Single ...
- Hive技术拾遗
1. SELECT语句可以使用正则表达式做列选择,下面的语句查询除了ds和h 之外的所有列:SELECT `(ds|hr)?+.+` FROM sales 2. LEFT SEMI JOIN的限制是, ...
- PostgreSQL配置文件--AUTOVACUUM参数
8 AUTOVACUUM参数 AUTOVACUUM PARAMETERS 8.1 autovacuum 字符型 默认: autovacuum = on Enable autovacuum subpro ...
- piwik网站访问统计系统
一.Piwik介绍 Piwik是一套基于PHP+MySQL技术构建的开源网站访问统计系统.Piwik可以给你详细的统计信息,比如网页浏览人数,访问最多的页面,搜索引擎关键词等流量分析功能.此外,它还采 ...
- solr 自聚类实现
参考官网:https://lucene.apache.org/solr/guide/6_6/result-clustering.html 最近用到solr自聚类的,先简单介绍如下: 1.配置文件 主要 ...
- javat Itext实践 pdf
1.简介 iText是著名的开放项目,是用于生成PDF文档的一个java类库.通过iText不仅可以生成PDF或rtf的文档,而且可以将XML.Html文件转化为PDF文件. 下载地址:https:/ ...
- TestNG 七 annotation
TestNG中用到的annotation的快速预览及其属性. @BeforeSuite: 被注释的方法将在所有测试运行前运行 @AfterSuite: 被注释的方法将在所有测试运行后运行 @Be ...
- projecteuler---->problem=10----Summation of primes
title: The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below tw ...
- MyCAT学习总结
MyCAT介绍 简单的说,MyCAT就是: 一个彻底开源的,面向企业应用开发的“大数据库集群” 支持事务.ACID(指数据库事务正确执行的四个基本要素的缩写.包含:原子性(Atomicity).一 ...