Histogram Legend

Hi All, I have been trailing a very useful tool for producing heatmaps from mesh surfaces created by @AndersDeleuran.

I was wondering how a Colour Scale Legend could be produced to give greater context to what the colours are representing in regards to height deviation. Similar to the image below.


I have been trying to merge a couple of example definitions that I have found online, but have not had much success. The original GH definition is here:
GHopper_HeatMap.gh (544.7 KB)

Many thanks in advance!

Hi Michael, the simplest solution (and the one in your reference image I think) is to use the native Legend component and feed it a rectangle input. I’ve quickly slapped that onto the definition I posted in the other thread:

230222_BasicSlopeAnalysis_00.gh (60.8 KB)

I’ve been using screen space legends/HUD’s myself for the past couple of years, as those work better during the design process I find. There are probably plugins for this, but the base GHPython methods I’ve been building these with can be found in this thread:

A more advanced bar chart built using the same methods can be seen here:

Also, are you the Michael Wilson of Dermoid fame?

1 Like

Hey @AndersDeleuran,
Thanks for the pointers! I think I have one fundamental issue, that being I am running Rhinov5 (I know, so behind the times…) and I am noticing that the colour mesh component is slightly different being AHSL inputs, whereas you have AHSV inputs. My Grasshopper knowledge is pretty basic, so not entirely sure if this is the main issue…
Also, thanks for the other threads you supplied for some context, very helpful. I find usually I have simple issues to solve, but the most time consuming task is trying to find the answers online! Usually, when searching threads to find the answers to my issues, you are always involved in the conversation(s) or have done/solved something similar in the past.
And yes, this is indeed the Dermoid dude! Hehehe, the good old dayz. How have you been mate? I see you have moved on from academia. Have you completed that PHD yet?
Many thanks again mate!

1 Like

Ah yes, I missed the Rhino5 part, my bad. The HSL color space should work, I don’t see much/any difference:

You could probably also use the native Gradient component. I prefer more explicit methods for defining/generating custom gradients though. The one I wrote here might also work for you I imagine:

Haha, that’s amazing. Dermoid lives!! Doing alright post-academia. Never did hand in the PhD, been chipping away at it for years when I get the chance (which is less and less after parenthood/long covid). Hope you’re doing great down under :slight_smile:



1 Like