# LookupTable on Grid not working

**URL:** https://discourse.vtk.org/t/lookuptable-on-grid-not-working/1807
**Category:** Support
**Created:** [September 23, 2019, 3:48pm UTC](https://discourse.vtk.org/t/lookuptable-on-grid-not-working/1807 "2019-09-23T15:48:05Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Mikend994](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/m/85e7bf/32.png) [@Mikend994](https://discourse.vtk.org/u/Mikend994)
#### Post date: [September 23, 2019, 3:48pm UTC](https://discourse.vtk.org/t/lookuptable-on-grid-not-working/1807/1 "2019-09-23T15:48:05Z")

</div>

Hi, I’m trying to connect a LookupTable on a Grid(like one from examples). I have seen some tutorial and I have done what was in there, but it still not working.

I have defined a new lookup table like this

```
    vtkSmartPointer<vtkLookupTable> lut =
vtkSmartPointer<vtkLookupTable>::New();

lut->SetNumberOfTableValues(x.size() * y.size());
lut->SetTableValue(0, colors->GetColor4d("Orange").GetData());
lut->Build();

```

and connected with the grid through the mapper, like this

```
    rgridMapper->SetLookupTable(lut);
rgridMapper->SetUseLookupTableScalarRange(true);
rgridMapper->SetScalarModeToUsePointData();

```

Anyway it’s still not working. Why is it happening? How could I set a lookup table on a grid? Thanks
