Python Forum
Modifying the axis ticks from words to lines
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Modifying the axis ticks from words to lines
#1
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
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020