import numpy as np
import matplotlib.pyplot as plt
# Compute areas and colors
r= dt.iloc[0:9,2]
theta = dt.iloc[0:9,1]
area = r
colors = r
fig = plt.figure()[![enter image description here][1]][1]
ax = fig.add_subplot(projection='polar')
c = ax.scatter(theta, r, c=colors, s=area, cmap='hsv', alpha=0.75)
data= {'device': {0: 'Laptop', 1: 'Laptop', 2: 'Laptop', 3: 'Laptop', 4: 'Laptop'},
'power': {0: 20, 1: 23, 2: 20, 3: 22, 4: 19},
'time': {0: '16/11/2012 11:29',
1: '16/11/2012 11:30',
2: '16/11/2012 11:31',
3: '16/11/2012 11:32',
4: '16/11/2012 11:33'},
'time_string': {0: '16/11/2012 11:29',
1: '16/11/2012 11:30',
2: '16/11/2012 11:31',
3: '16/11/2012 11:32',
4: '16/11/2012 11:33'},
'x': {0: 0.17, 1: 0.17, 2: 0.17, 3: 0.17, 4: 0.17},
'y': {0: 0.48, 1: 0.48, 2: 0.48, 3: 0.48, 4: 0.48}}
您好,我想創建一個時鐘圖表,以時鐘表示形式按時間顯示功耗。我們如何在極坐標周圍添加精確的時鐘數?以及我們如何在時鐘中通過時間來顯示力量?有人可以幫我解決這個問題嗎?提前致謝。
影像=
uj5u.com熱心網友回復:
正如我評論的那樣,我添加了一個刻度標簽,如 24 小時制,頂部設定為 0:00,參考
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/473878.html
標籤:Python 熊猫 matplotlib 情节地 极坐标
上一篇:Matplotlib散點圖雙y軸