Code: Alles auswählen
import matplotlib.pyplot as plt
import numpy as np
mean=[0,0]
cov=[[1,1],[1,2]]
x,y = np.random.multivariate_normal(mean,cov,10000).T
fig=plt.figure()
ax=plt.axes()
cax=ax.hist2d(x,y,bins=30,cmap="Blues")
cb=fig.colorbar(cax)
cb.ax.set_label("counts in bin")
plt.show()
Was mache ich falsch? Ich bin mir relativ sicher, dass es was damit zu tun hat. Vielleicht noch vorne weg, ich möchte die Methoden von ax und fig nutzen (objektorientiert) anstelle der Funktionen von plt.AttributeError: 'tuple' object has no attribute 'autoscale_None'
Vielen Dank schonmal für die Antworten!!