# Labels in multi-column VTK objects

**URL:** https://discourse.paraview.org/t/labels-in-multi-column-vtk-objects/9737
**Category:** ParaView Support
**Tags:** python, vtk
**Created:** [June 4, 2022, 8:14am UTC](https://discourse.paraview.org/t/labels-in-multi-column-vtk-objects/9737 "2022-06-04T08:14:50Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Andrei](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/9fc29f/32.png) [@Andrei](https://discourse.paraview.org/u/Andrei)
#### Post date: [June 4, 2022, 8:14am UTC](https://discourse.paraview.org/t/labels-in-multi-column-vtk-objects/9737/1 "2022-06-04T08:14:50Z")

</div>

Dear colleagues! I did the calculations using Programmable Filter and append the results to CellData using `output.CellData.append(MyData, ‘Title’)`. Depending on the number of columns in MyData, they are assigned the label `XY`, `XYZ`, `1234` (see figures). Is it possible to assign a custom label, for example, `230MPa`, `270MPa`, `300MPa`

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

![xyz](https://discourse.paraview.org/uploads/default/original/2X/0/0088a01b271e20ecbe91a661e73658bfeace5e7c.png)

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [June 6, 2022, 9:07am UTC](https://discourse.paraview.org/t/labels-in-multi-column-vtk-objects/9737/2 "2022-06-06T09:07:35Z")

</div>

Hi @Andrei ,

use SetComponentName to manually set the name.

Best,

---

<div class="post-metadata">

### Author: ![Andrei](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/9fc29f/32.png) [@Andrei](https://discourse.paraview.org/u/Andrei)
#### Post date: [June 10, 2022, 1:19pm UTC](https://discourse.paraview.org/t/labels-in-multi-column-vtk-objects/9737/3 "2022-06-10T13:19:53Z")

</div>

Dear @mwestphal , thank you very much for the answer! Could you give more information? How to apply the solution to an object `MyData` that contains for example, three components (not counting Magnitude)

```auto
MyData.SetComponentName(???)
output.CellData.append(MyData, 'Title')

```

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [June 10, 2022, 1:36pm UTC](https://discourse.paraview.org/t/labels-in-multi-column-vtk-objects/9737/4 "2022-06-10T13:36:12Z")

</div>

Hi @Andrei ,

Probably something like:

```auto
output.CellData.append(MyData, 'Title')
output.CellData.GetArray("Title").SetComponentName("name")

```

I dont think the numpy adaptor is equiped with component name api.

@nicolas.vuaille

---

<div class="post-metadata">

### Author: ![Andrei](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/9fc29f/32.png) [@Andrei](https://discourse.paraview.org/u/Andrei)
#### Post date: [June 10, 2022, 1:53pm UTC](https://discourse.paraview.org/t/labels-in-multi-column-vtk-objects/9737/5 "2022-06-10T13:53:24Z")

</div>

Unfortunately, it doesn’t work yet. It is possible that another software environment is meant. I am working in a ProgrammableFilter. Here are the parameters of the object after

```auto
print(dir(MyData))
print(type(MyData))
['Arrays', 'Association', 'DataSet', 'GetArrays', 'GetSize', 'Initialized', 'Name', '_Arrays', '_VTKCompositeDataArray __init_from_composite', '__ add __', '__ and __', '__ class __', '__ delattr __', '__ dict __', '__ dir __', '__ doc __', '__ eq __', '__ floordiv __', '__ format __', '__ ge __', '__ getattribute __', '__ getitem __', '__ gt __', '__ hash __', '__ init __', '__ init_subclass __', '__ le __', '__ lshift __', '__ lt __', '__ mod __', '__ module __', '__ mul __', '__ ne __', '__ new __', '__ or __', '__ pow __', '__ radd __', '__ rand __', '__ reduce __', '__ reduce_ex __', '__ repr __', '__ rfloordiv __', '__ rlshift __', '__ rmod __', '__ rmul __', '__ ror __', '__ rpow __', '__ rrshift __', '__ rshift __', '__ rsub __', '__ rtruediv __', '__ rxor __', '__ setattr __', '__ sizeof __', '__ str __', '__ sub __', '__ subclasshook __', '__ truediv __', '__ weakref __', '__ xor__', '_numeric_op', '_reverse_numeric_op', 'astype', 'size']
<class 'paraview.vtk.numpy_interface.dataset_adapter.VTKCompositeDataArray'>

```

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [June 10, 2022, 1:58pm UTC](https://discourse.paraview.org/t/labels-in-multi-column-vtk-objects/9737/6 "2022-06-10T13:58:36Z")

</div>

> [@Andrei](#):
>
> `VTKNoneArray`

This is not an actual array

---

<div class="post-metadata">

### Author: ![Andrei](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/a/9fc29f/32.png) [@Andrei](https://discourse.paraview.org/u/Andrei)
#### Post date: [June 10, 2022, 2:00pm UTC](https://discourse.paraview.org/t/labels-in-multi-column-vtk-objects/9737/7 "2022-06-10T14:00:58Z")

</div>

I’m very sorry, I updated the output of the function dir and type above
