I have a matrix with sales per year for clients. Column wise I wish to have years. Line wise I wish to have companies. Color is indicative for the value (number of sales per year per client).
It is a heatmap with discrete qualitative (clients name) variable.
How could I display this ?
EDIT:
to rephrase, this is about creating an heatmap with a label per row (or a left label per cell). heatmap is plotted with pylab and gives
I wish to replace graduation on the left with label (discrete qualitative).
I'm not exactly sure what you are trying to achieve, but this code
import numpy as np
import matplotlib.pyplot as plt
data = np.random.random((20, 3))
plt.imshow(data, interpolation='none', aspect=3./20)
plt.xticks(range(3), ['a', 'b', 'c'])
plt.jet()
plt.colorbar()
plt.show()
seems to produce what you want:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With