是否可以在Seaborn 1D热图中切换---
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: vs
spec:
hosts:
- "*"
gateways:
- gateway
http:
- match:
- uri:
prefix: "/kibana"
route:
- destination:
port:
number: 5601
host: kibana
- match:
- uri:
prefix: "/grafana"
route:
- destination:
port:
number: 3000
host: grafana
`
-和x
轴?
实际图如下:
我对此图的代码如下:
y
因此,最后,#Histogram data
n1, bins1, patches1 = plt.hist(x_start, bins=binwidth, cumulative=False, normed=1, facecolor='#023d6b', alpha=0.8, histtype='bar',label='density random')
n2, bins2, patches2 = plt.hist(histo, bins=binwidth, cumulative=False, normed=1, facecolor='red', alpha=0.5, histtype='bar',label='density real')
df = pd.DataFrame({'Departure real': n2,'Departure model':n1},
index= bins2[:-1]+1)
#Plot Options
fig2, ax2 =plt.subplots(figsize=(16,11))
ax2=sns.heatmap(df, annot=False, fmt="g",cmap="seismic",cbar_kws={'label': 'Probability'})
ax2.figure.axes[-1].yaxis.label.set_size(16)
ax2.set_ylabel('Hours [h]', fontsize=16)
ax2.xaxis.set_tick_params(labelsize=16)
ax2.yaxis.set_tick_params(labelsize=16)
ax2.invert_yaxis()
cax = plt.gcf().axes[-1]
cax.tick_params(labelsize=16)
应该在Hours [h]
轴上,x
,Departure model
应该在Departure real
轴上。到目前为止,我找不到任何解决方案。如果有另一种方法可以更好地做到这一点,我就不必使用Seaborn。