Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Defining block sizes in heatmaps

Hi,

From what I’ve looked on the forum and Google, this isn’t possible, but I’d love to know if it is. I need a grid of 5x5 or 6x6, but each column may not be the same width. Crappy Excel pic to demonstrate.

00

I’ve seen the example here, but this seems to be for blocks “within” blocks, not a basic grid. Any thoughts (doing it in Python) welcome

Thanks

Will

You can try setting the heatmap y coordinate like in https://codepen.io/etpinard/pen/GvYYgR?editors=0010

That y doesn’t directly define the block’s widths, but it specifies that bounds of each block when the length of y equals the column length of z plus 1.

I hope this helps.

1 Like

Hi @etienne. Sorry that I didn’t reply to this. I decided to avoid this headache and use regular sized blocks. Progress has been good … but I’ve reached a roadblock in aligning the heatmap with the layout. It has to be precise and accurate, but I can’t fit it correctly.

I have a layout, -1 to +1, and 0 to 10 in height. I need to fit the heatmap so that the top-left block is at x-1 y0. Top right should be x1 y0. Below is the closest I can get (x-1 y-0.5); looks like it’s calculating the dimension based on the centre of each block size, is that right?

Is what I need possible do you think?