社区微信群开通啦,扫一扫抢先加入社区官方微信群
社区微信群
python简洁的代码实现炫酷的功能,一副坐标图献给各位看官瞧瞧
# -*- coding: utf-8 -*-
"""
Created on Fri Jan 19 13:34:15 2018
@author: administrator
"""
import numpy as np
import matplotlib.pyplot as plt
# Compute areas and colors
N = 150
r = 2 * np.random.rand(N)
theta = 2 * np.pi * np.random.rand(N)
area = 200 * r**2
colors = theta
ax = plt.subplot(111, projection='polar')
c = ax.scatter(theta, r, c=colors, s=area, cmap='hsv', alpha=0.75)
plt.show()
如需python视频+源码的可以扫个微信。分享一些资料给你!
如果觉得我的文章对您有用,请随意打赏。你的支持将鼓励我继续创作!