Python Forum
How to manually define color bar scale in seaborn heatmap
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to manually define color bar scale in seaborn heatmap
#1
Hi,

I want to define color bar, how to define manually.
I use below example:

import numpy as np; np.random.seed(0)
import seaborn as sns; sns.set()
uniform_data = np.random.rand(10, 12)
ax = sns.heatmap(uniform_data)
The automatic color bar ticks getting here are 0.2,0.4,0.6,0.8, but I want to display 0.0,0.2,0.4,0.6,0.8,1.0. How to make this.
Reply


Messages In This Thread
How to manually define color bar scale in seaborn heatmap - by SriRajesh - Mar-04-2019, 02:13 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  manually input data jpatierno 0 348 Nov-10-2023, 02:32 AM
Last Post: jpatierno
  Turtle Star Fill Color Yellow-White Interchanging Color Effect codelab 9 1,041 Oct-25-2023, 09:09 AM
Last Post: codelab
  Trying to loop through code to plot seaborn line plots across multiple subplots eyavuz21 0 1,695 Dec-05-2022, 10:46 AM
Last Post: eyavuz21
  How to properly scale text in postscript conversion to pdf? philipbergwerf 3 1,140 Nov-07-2022, 01:30 PM
Last Post: philipbergwerf
  How to plot seaborn heatmap on top of a background circle SriRajesh 0 1,425 Jul-09-2022, 04:00 AM
Last Post: SriRajesh
  Installing and Using Seaborn Led_Zeppelin 4 2,592 Jun-07-2022, 09:44 PM
Last Post: snippsat
  KeyError: 0 when trying to dedupe and match records at scale Catalytic 1 2,190 Apr-07-2022, 06:34 PM
Last Post: deanhystad
  How to increase the size of a png picture for the heatmap of the correlation? lulu43366 9 3,547 Oct-06-2021, 04:15 PM
Last Post: deanhystad
  How to remove a column or two columns in a correlation heatmap? lulu43366 3 5,245 Sep-30-2021, 03:47 PM
Last Post: lulu43366
  Matplotlib scale julienhofmann 0 1,814 Apr-04-2021, 08:50 AM
Last Post: julienhofmann

Forum Jump:

User Panel Messages

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