Modifying the axis ticks from words to lines - Printable Version +- Python Forum (https://python-forum.io) +-- Forum: Python Coding (https://python-forum.io/forum-7.html) +--- Forum: Homework (https://python-forum.io/forum-9.html) +--- Thread: Modifying the axis ticks from words to lines (/thread-34488.html) |
Modifying the axis ticks from words to lines - ranbarr - Aug-04-2021 Hi, Im trying to modify the yticks at my heat map from words to lines. thats my code: with open('heat1.csv', 'r', encoding='mac_roman', newline='') as csvfile: df = pd.read_csv(csvfile, sep=',') df['id'] = df['id'].apply(lambda x: x[:-2]) df = df.fillna(0) grpby = df.groupby('id', as_index=True).mean() plt.subplots(figsize = (250,100)) sns.set(font_scale=7.5) sns.heatmap(grpby, cmap='coolwarm', vmin = 0, center = 750000 , vmax=2000000) plt.ylabel('') plt.show()this is my heatmap: https://ibb.co/L5JnHHj And I want to ticks to look like this: https://ibb.co/sm8hJ47 |