# Color by vector component?

**URL:** https://discourse.paraview.org/t/color-by-vector-component/1031
**Category:** ParaView Support
**Created:** [December 11, 2018, 10:09pm UTC](https://discourse.paraview.org/t/color-by-vector-component/1031 "2018-12-11T22:09:05Z")
**Posts on this page:** 11
**Page:** 1

<div class="post-metadata">

### Author: ![peytondmurray](https://discourse.paraview.org/user_avatar/discourse.paraview.org/peytondmurray/32/932_2.png) [@peytondmurray](https://discourse.paraview.org/u/peytondmurray)
#### Post date: [December 11, 2018, 10:09pm UTC](https://discourse.paraview.org/t/color-by-vector-component/1031/1 "2018-12-11T22:09:06Z")

</div>

In previous versions of Paraview, when a vector field was used as the active attribute of the Glyph filter, it was possible to color the glyphs by the vector components - you would just select “GlyphVector” under the Coloring section of the Display area, and then choose whether you wanted the magnitude or the x, y, or z component to be used for the colormap.

After the release of 5.6, the properties tab of the Glyph filter has been modified, and these options are no longer possible. Using the same dataset, only solid colors or scalars are available for coloring. How can I color a glyph filter by vector components from an input dataset?

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [December 11, 2018, 11:13pm UTC](https://discourse.paraview.org/t/color-by-vector-component/1031/2 "2018-12-11T23:13:37Z")

</div>

You are right, the “GlyphVector” has been removed from the output of the **Glyph** filter. However, it was a copy of the vector field used for orientation. That vector field is copied to the output of the **Glyph** filter, so whichever vector field you use as the **Orientation Array** can still be selected in the “Color By” popup menu, and you can select the component for coloring.

---

<div class="post-metadata">

### Author: ![peytondmurray](https://discourse.paraview.org/user_avatar/discourse.paraview.org/peytondmurray/32/932_2.png) [@peytondmurray](https://discourse.paraview.org/u/peytondmurray)
#### Post date: [December 12, 2018, 12:57am UTC](https://discourse.paraview.org/t/color-by-vector-component/1031/3 "2018-12-12T00:57:43Z")

</div>

Okay, then this really seems like an issue with me, not with paraview. For me, I can select the input vector field for the **Orientation Array** but the same vector field is not available for the coloring. Here’s a minimal example input file, with 3 vectors stored as cell data:

```
# vtk DataFile Version 2.0

ASCII
DATASET RECTILINEAR_GRID
DIMENSIONS 4 2 2
X_COORDINATES 4 double
0.0 10.0 20.0 30.0
Y_COORDINATES 2 double
0.0 10.0
Z_COORDINATES 2 double
0.0 10.0
CELL_DATA 3
VECTORS spins double
-1.0 0.0 0.0
0.0 1.0 0.0
1.0 0.0 0.0

```

I’ve also attached a screenshot for clarification.

 ![issue](https://discourse.paraview.org/uploads/default/original/1X/d9d81e1d714dc9bd2c117eb1a9898bc7be0122f3.png)

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [December 12, 2018, 6:22pm UTC](https://discourse.paraview.org/t/color-by-vector-component/1031/4 "2018-12-12T18:22:24Z")

</div>

Ah, you’re right. Thanks for the detailed report and test data set. The cell data array used as the “orientation array” is not copied over to the output, in contrast to point data arrays, which _are_ copied if set as the orientation array. I’ve opened an [issue](https://gitlab.kitware.com/paraview/paraview/issues/18662) for it.

---

<div class="post-metadata">

### Author: ![guatavita](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/g/7993a0/32.png) [@guatavita](https://discourse.paraview.org/u/guatavita)
#### Post date: [June 14, 2019, 8:41pm UTC](https://discourse.paraview.org/t/color-by-vector-component/1031/5 "2019-06-14T20:41:38Z")

</div>

Is this issue has been resolved?

I downloaded the fresh 5.6.1 64bit for Windows and the option is still not available, but was on the previous version.

Thank you

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [June 14, 2019, 9:03pm UTC](https://discourse.paraview.org/t/color-by-vector-component/1031/6 "2019-06-14T21:03:27Z")

</div>

It has not been resolved yet.

---

<div class="post-metadata">

### Author: ![Piet](https://discourse.paraview.org/user_avatar/discourse.paraview.org/piet/32/2656_2.png) [@Piet](https://discourse.paraview.org/u/Piet)
#### Post date: [January 6, 2020, 10:18pm UTC](https://discourse.paraview.org/t/color-by-vector-component/1031/7 "2020-01-06T22:18:21Z")

</div>

Hi, I have the same problem here with Paraview 5.7.0 on MacOS. When will this issue be resolved?

I use point data, no cells. I can set my vectors as orientation array, but still they do not show up as option for coloring. With the same dataset and Paraview 5.4 on Ubuntu it works fine.

Is there any workaround for this?

---

<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: [January 7, 2020, 10:28am UTC](https://discourse.paraview.org/t/color-by-vector-component/1031/8 "2020-01-07T10:28:50Z")

</div>

@Piet @guatavita : This issue has not been funded yet. Feel free to contact us directly if you are interested to fund this.

---

<div class="post-metadata">

### Author: ![wascott](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/8e8cbc/32.png) [@wascott](https://discourse.paraview.org/u/wascott)
#### Post date: [January 7, 2020, 6:54pm UTC](https://discourse.paraview.org/t/color-by-vector-component/1031/9 "2020-01-07T18:54:21Z")

</div>

@mathieu, actually this has been funded and scheduled. [18662](https://gitlab.kitware.com/paraview/paraview/issues/18662) . It is scheduled for this coming fall, although I bet it slips into 2021. As you state, if @piet or @guatavita want to work on it, that would be great!

---

<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: [January 8, 2020, 9:31am UTC](https://discourse.paraview.org/t/color-by-vector-component/1031/10 "2020-01-08T09:31:05Z")

</div>

I should have checked the issue ! Thanks @wascott !

---

<div class="post-metadata">

### Author: ![Florent\_VIROT](https://discourse.paraview.org/user_avatar/discourse.paraview.org/florent_virot/32/3425_2.png) [@Florent\_VIROT](https://discourse.paraview.org/u/Florent_VIROT)
#### Post date: [April 10, 2020, 8:58am UTC](https://discourse.paraview.org/t/color-by-vector-component/1031/11 "2020-04-10T08:58:28Z")

</div>

A simple workaround is to copy the array before applying Glyph with a calculator filter.
