# custom legend

**URL:** https://discourse.paraview.org/t/custom-legend/10417
**Category:** ParaView Support
**Created:** [September 27, 2022, 7:09am UTC](https://discourse.paraview.org/t/custom-legend/10417 "2022-09-27T07:09:39Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![garcfd](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/g/ccd318/32.png) [@garcfd](https://discourse.paraview.org/u/garcfd)
#### Post date: [September 27, 2022, 7:09am UTC](https://discourse.paraview.org/t/custom-legend/10417/1 "2022-09-27T07:09:39Z")

</div>

Is it possible to create custom legend in Paraview, like this one attached for Lawson wind comfort criteria?

![Lawson2001_meg](https://discourse.paraview.org/uploads/default/original/2X/8/803465cee6970b8080d348f051fcbc2e11f96e57.png)

---

<div class="post-metadata">

### Author: ![nicolas.vuaille](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nicolas.vuaille/32/5873_2.png) [@nicolas.vuaille](https://discourse.paraview.org/u/nicolas.vuaille)
#### Post date: [September 27, 2022, 8:45am UTC](https://discourse.paraview.org/t/custom-legend/10417/2 "2022-09-27T08:45:16Z")

</div>

I fear you cannot setup several columns for the color legend.

What you can do:

- have a discrete color legend and use custom text for each color
- display a table in the view, but without the colors

Example:

 ![image](https://discourse.paraview.org/uploads/default/original/2X/6/6eaa45a74f8ef41f117ebcffdb3761b5929cc198.png)

---

<div class="post-metadata">

### Author: ![garcfd](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/g/ccd318/32.png) [@garcfd](https://discourse.paraview.org/u/garcfd)
#### Post date: [September 27, 2022, 10:07am UTC](https://discourse.paraview.org/t/custom-legend/10417/3 "2022-09-27T10:07:09Z")

</div>

Hi Nicolas, thanks for your quick reply.

yes, that looks good - how do you create legend like that?

---

<div class="post-metadata">

### Author: ![nicolas.vuaille](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nicolas.vuaille/32/5873_2.png) [@nicolas.vuaille](https://discourse.paraview.org/u/nicolas.vuaille)
#### Post date: [September 27, 2022, 10:24am UTC](https://discourse.paraview.org/t/custom-legend/10417/4 "2022-09-27T10:24:08Z")

</div>

If your data only contains a small number of discrete values (in my examples, data is an integer with only 5 differents values used), use the “interpret values as categories” and fill the “Annotation” column

More options with the `Edit Color legend properties` from the top right corner button.

 ![customlegend](https://discourse.paraview.org/uploads/default/original/2X/6/659bbd2aaaf3f881f77fefcfc9c4496c48c6eaaf.png)

The table is just a “Text” source

---

<div class="post-metadata">

### Author: ![garcfd](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/g/ccd318/32.png) [@garcfd](https://discourse.paraview.org/u/garcfd)
#### Post date: [September 27, 2022, 10:48am UTC](https://discourse.paraview.org/t/custom-legend/10417/5 "2022-09-27T10:48:53Z")

</div>

thats perfect - thanks very much

---

<div class="post-metadata">

### Author: ![garcfd](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/g/ccd318/32.png) [@garcfd](https://discourse.paraview.org/u/garcfd)
#### Post date: [September 27, 2022, 12:43pm UTC](https://discourse.paraview.org/t/custom-legend/10417/6 "2022-09-27T12:43:26Z")

</div>

Actually it doesnt seem to work for me right now - I just get the Nan colour on my surface.  
Have you got a working example - or perhaps I could send you my slice of data to look at?  
Thanks

---

<div class="post-metadata">

### Author: ![garcfd](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/g/ccd318/32.png) [@garcfd](https://discourse.paraview.org/u/garcfd)
#### Post date: [September 27, 2022, 5:37pm UTC](https://discourse.paraview.org/t/custom-legend/10417/7 "2022-09-27T17:37:28Z")

</div>

yeah - Ive set it up as suggested (I think) but the surface stays grey which is the NaN colour.  
I dont know why the colourmap is not being applied to the surface - any ideas (please)?

![image](https://discourse.paraview.org/uploads/default/original/2X/c/c2134850cdc5b01af96e5f93d5a71db16de600d6.png)

---

<div class="post-metadata">

### Author: ![nicolas.vuaille](https://discourse.paraview.org/user_avatar/discourse.paraview.org/nicolas.vuaille/32/5873_2.png) [@nicolas.vuaille](https://discourse.paraview.org/u/nicolas.vuaille)
#### Post date: [September 28, 2022, 8:02am UTC](https://discourse.paraview.org/t/custom-legend/10417/8 "2022-09-28T08:02:23Z")

</div>

Well, if surface is colored with NaN color, I would suspect that your data contains NaN …

The standard way to color object following a color map:

- select the array to use for coloration
- then edit the color map

A lot of doc [here](https://docs.paraview.org/en/latest/ReferenceManual/colorMapping.html).

Also, which version of ParaView are you using ? Your editor looks like it is an old version.

---

<div class="post-metadata">

### Author: ![garcfd](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/g/ccd318/32.png) [@garcfd](https://discourse.paraview.org/u/garcfd)
#### Post date: [September 28, 2022, 11:03am UTC](https://discourse.paraview.org/t/custom-legend/10417/9 "2022-09-28T11:03:04Z")

</div>

I was able to do a demo surface plane, and plot the x-coordinate on that with categories and it seemed to work ok. So I will have to go back and check the original data.
