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}}
Hello, I want to create a clock chart to show power consumption by time in a clock representation. How can we add exact clock number around the polar coordinates? and How we can show the powers by their times in the clock? Could anyone please help me through this? Thanks in advance.
CodePudding user response:
As I commented, I added a scale label like a 24-hour clock, with 0:00 set at the top, in reference to