Relative Content

Tag Archive for pythonhistogram

syntaxError:keyword cannot be an expression

import matplotlib as plt
for label in (tel_data.columns):
plt.hist(tel_data[tel_data[‘class’]==’g’][label].colors=’red’, label=’gamma’,alpha=0.5, density=’True’)
plt.hist(tel_data[tel_data[‘class’]==’h’][label].colors=’blue’, label=’hadron’,alpha=0.5, density=’True’)
plt.title(label)
plt.ylabel(“probabllity”)
plt.xlabel(label)
plt.legend()
tre=plt.show()
print(tre)