Given the following sample data
data =\
{'q1': [6, 4, 4, 4, 6, 6, 6, 4, 6, 6, 6, 6],
'q2': [3, 3, 3, 4, 3, 3, 4, 3, 4, 3, 4, 1],
'q3': [6, 3, 4, 4, 4, 4, 6, 6, 6, 6, 4, 1],
'q4': [3, 6, 6, 6, 6, 6, 4, 4, 6, 4, 6, 4],
'q5': [4, 3, 3, 3, 3, 6, 6, 4, 4, 6, 3, 4],
'q6': [3, 3, 4, 4, 6, 3, 3, 1, 6, 4, 4, 4],
'q7': [4, 3, 3, 3, 3, 6, 4, 1, 4, 1, 4, 1],
'q8': [4, 4, 1, 6, 4, 6, 4, 1, 6, 1, 4, 1],
'q9': [4, 6, 4, 3, 4, 3, 4, 6, 6, 4, 3, 4],
'q10': [3, 4, 1, 3, 4, 3, 3, 6, 6, 3, 4, 4]}
Here is my code:
import seaborn as sns
import pandas as pd
df = pd.DataFrame(data)
cm = sns.heatmap(df.T, annot=False, cbar=True)
cm.get_figure().savefig('heatmap.pdf')
And here is the output:
What I'm trying to do is add custom y-axis ticks on the right, something like this:
How can I do this? I looked into using tick_params
as suggested