散点——条形图
plt.style.use('ggplot')
plt.style.use('ggplot')
x = np.random.randn(200)
y=x+np.random.randn(200)*0.5
margin_border = 0.1
width =0.6
height = 0.2
margin_between=0.02
x = np.random.randn(200)
y=x+np.random.randn(200)*0.5
margin_border = 0.1
width =0.6
height = 0.2
margin_between=0.02
left_s = margin_border
bottom_s = margin_border
height_s= width
width_s = width
x
left_x = margin_border
bottom_x = margin_border+width+margin_between
height_x= height
width_x = width
r
left_y = margin_border+width+margin_between
bottom_y = margin_border
height_y = width
width_y = height
x
plt.figure(1,figsize=(10,10))
rect_s=[left_s,bottom_s,height_s,width_s]
rect_x=[left_y,bottom_y,height_y,width_y]
rect_y=[left_x,bottom_x,height_x,width_x]
<Figure size 720x720 with 0 Axes>
y
axScatter=plt.axes(rect_s)
axHistX=plt.axes(rect_x)
axHistY=plt.axes(rect_y)
import numpy as np
import matplotlib.pyplot as plt
import numpy as np
import matplotlib.pyplot as plt
'
plt.style.use('ggplot')
ability_size = 6
ability_label = ['进攻','防守','盘带','速度','体力','射术']
4
ax1=plt.subplot(221,projection='polar')
ax2=plt.subplot(222,projection='polar')
ax3=plt.subplot(223,projection='polar')
ax4=plt.subplot(224,projection='polar')
player = {'M':np.random.randint(size=ability_size,low=60,high=99),
'H':np.random.randint(size=ability_size,low=60,high=99),
'P':np.random.randint(size=ability_size,low=60,high=99),
'Q':np.random.randint(size=ability_size,low=60,high=99)}
player = {'M':np.random.randint(size=ability_size,low=60,high=99),
'H':np.random.randint(size=ability_size,low=60,high=99),
'P':np.random.randint(size=ability_size,low=60,high=99),
'Q':np.random.randint(size=ability_size,low=60,high=99)}
theta = np.linspace(0,2*np.pi,6,endpoint=False)
theta = np.append(theta,theta[0])
player['M'] = np.append(player['M'],player['M'][0])
pha = 0.3
ax1.plot(theta,player['M'],'r')
ax1.fill(theta,player['M'],'r',alpha = 0.3)
[<matplotlib.patches.Polygon at 0x1d4301a1be0>]
plt.show()
实战2
最新推荐文章于 2023-06-24 17:06:45 发布