matplotlib之极坐标系的极径网格线(rgrids)的显示刻度
1 #!/usr/bin/env python3
2 #-*- coding:utf-8 -*-
3 ############################
4 #File Name: polar.py
5 #Author: frank
6 #Mail: frank0903@aliyun.com
7 #Created Time:2018-05-22 22:08:01
8 ############################
9 importmatplotlib.pyplot as plt10 importnumpy as np11 importmatplotlib as mpl12
13 zhfont = mpl.font_manager.FontProperties(fname='/usr/share/fonts/truetype/wqy/wqy-microhei.ttc')14
15 x = plt.subplot(111, polar=True)16
17 plt.figtext(0.52, 0.95, '默认rgrids', ha='center', size=20,fontproperties=zhfont)18 plt.rgrids()19 plt.savefig('default_rgrids.jpg')20 plt.show()21
22 plt.figtext(0.52, 0.95, '指定radii', ha='center', size=20,fontproperties=zhfont)23 plt.rgrids((0.25, 0.5, 1.0))24 plt.savefig('sp