# Vector glyph orient not working

**URL:** https://discourse.paraview.org/t/vector-glyph-orient-not-working/184
**Category:** ParaView Support
**Created:** [June 14, 2018, 7:57pm UTC](https://discourse.paraview.org/t/vector-glyph-orient-not-working/184 "2018-06-14T19:57:31Z")
**Posts on this page:** 16
**Page:** 1

<div class="post-metadata">

### Author: ![Chris\_Marsh](https://discourse.paraview.org/user_avatar/discourse.paraview.org/chris_marsh/32/85_2.png) [@Chris\_Marsh](https://discourse.paraview.org/u/Chris_Marsh)
#### Post date: [June 14, 2018, 7:57pm UTC](https://discourse.paraview.org/t/vector-glyph-orient-not-working/184/1 "2018-06-14T19:57:32Z")

</div>

I have a triangular mesh that I visualize in ParaView. Each cell has vector data I would like to show (wind direction). I assign the cell the vector via  
\_vtk\_unstructuredGrid-\>GetCellData()-\>AddArray(vector\_dir\_array);.

I’ve confirmed the x,y vector components are correct by plotting in Maple. When I visualize the vector via the Arrow Glyph in ParaView, and selecting the ‘Orient’ option, the glyphs are all aligned to point towards +X direction.

With just the unstructured surface displayed, if I set the face colouring to be my vector, I can choose the X and Y components separately and this shows the faces do have X,Y values that a) are different and b) don’t point in +X direction.

Would appreciate any suggestions on how to proceed.

---

<div class="post-metadata">

### Author: ![aron.helser](https://discourse.paraview.org/user_avatar/discourse.paraview.org/aron.helser/32/13_2.png) [@aron.helser](https://discourse.paraview.org/u/aron.helser)
#### Post date: [June 14, 2018, 8:32pm UTC](https://discourse.paraview.org/t/vector-glyph-orient-not-working/184/2 "2018-06-14T20:32:10Z")

</div>

Just a quick thought - what are you doing with the Z component? Have you tried setting all Zs to zero?  
-Aron

---

<div class="post-metadata">

### Author: ![Chris\_Marsh](https://discourse.paraview.org/user_avatar/discourse.paraview.org/chris_marsh/32/85_2.png) [@Chris\_Marsh](https://discourse.paraview.org/u/Chris_Marsh)
#### Post date: [June 14, 2018, 8:38pm UTC](https://discourse.paraview.org/t/vector-glyph-orient-not-working/184/3 "2018-06-14T20:38:02Z")

</div>

Ah sorry, should have specified. They are currently being set to 0.

---

<div class="post-metadata">

### Author: ![Chris\_Marsh](https://discourse.paraview.org/user_avatar/discourse.paraview.org/chris_marsh/32/85_2.png) [@Chris\_Marsh](https://discourse.paraview.org/u/Chris_Marsh)
#### Post date: [June 17, 2018, 12:48am UTC](https://discourse.paraview.org/t/vector-glyph-orient-not-working/184/4 "2018-06-17T00:48:19Z")

</div>

Update: appears to be a problem with paraview 5.5.1 on MacOS. The code for the vector IO had been working previously, but I made some changes and thought I’d broken it, and wanted to pose the question w/o the overhead of “this used to work”.

On my desktop I have an old version of paraview, 5.3 RC3. However, it correctly displays the vectors, and allows for me to color them, etc.

The version of PV on my laptop is 5.5.1, and it does not correctly display the vectors nor allows for me to colour them.

I’ve attached two images to show what I mean.

**works**

 ![wind_works](https://discourse.paraview.org/uploads/default/original/1X/141e3d1860c91b704863f501a0a03b9b5f5a22c6.jpg)

**PV 5.5.1 on MacOS**

 ![wind](https://discourse.paraview.org/uploads/default/original/1X/99f1a14a12e3571ce5c5a67408a4dcc2a8b6905b.jpg)

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [June 17, 2018, 1:05pm UTC](https://discourse.paraview.org/t/vector-glyph-orient-not-working/184/5 "2018-06-17T13:05:10Z")

</div>

Can you share the dataset? That’ll make it easier to figure out what’s going on. Thanks.

---

<div class="post-metadata">

### Author: ![Chris\_Marsh](https://discourse.paraview.org/user_avatar/discourse.paraview.org/chris_marsh/32/85_2.png) [@Chris\_Marsh](https://discourse.paraview.org/u/Chris_Marsh)
#### Post date: [June 19, 2018, 6:15pm UTC](https://discourse.paraview.org/t/vector-glyph-orient-not-working/184/6 "2018-06-19T18:15:15Z")

</div>

@utkarsh.ayachit sorry for the slow reply, I was expecting an email if someone replied!

I think it’s a different timestamp than what I showed above, but the winds are from mostly the south (North is up) and they’re spatially variable, so they shouldn’t show a uniform from the west wind, like that shown in the bottom image.

I’ve confirmed this is still a problem with 5.5.1 on MacOS

[https://drive.google.com/open?id=1yTywTIdh1tzVoqS7iIDjNVhzvy0W2hLT](https://drive.google.com/open?id=1yTywTIdh1tzVoqS7iIDjNVhzvy0W2hLT)

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [June 19, 2018, 6:47pm UTC](https://discourse.paraview.org/t/vector-glyph-orient-not-working/184/7 "2018-06-19T18:47:47Z")

</div>

That’s odd. Here’s what I see on macOS 10.11.6 (El Capitan).

 ![image](https://discourse.paraview.org/uploads/default/original/1X/e754b1f077324e9bdbb5285d518fa8b0bde7e07e.jpg)

Also attached the state file for 5.5.1.[state.pvsm](https://discourse.paraview.org/uploads/default/original/1X/1b6a0c66eb171dff7faf23001113dbf837c23954.pvsm) (322.4 KB)

It’s worth trying to run with `-dr` command line option. Maybe some previously set setting is interfering.

> [@Chris\_Marsh](#):
>
> I was expecting an email if someone replied!

Check [this](https://discourse.paraview.org/t/using-discourse-as-a-mailing-list/64) out to setup emails.

---

<div class="post-metadata">

### Author: ![Chris\_Marsh](https://discourse.paraview.org/user_avatar/discourse.paraview.org/chris_marsh/32/85_2.png) [@Chris\_Marsh](https://discourse.paraview.org/u/Chris_Marsh)
#### Post date: [June 19, 2018, 7:29pm UTC](https://discourse.paraview.org/t/vector-glyph-orient-not-working/184/8 "2018-06-19T19:29:15Z")

</div>

Ok, `-dr` fixed it! That is strange… Any idea what could have happen to cause that?  
Also strange: Opening the save state would correctly show the vectors, but would still fail when I tried it until the `-dr` command.

What does `-dr` do?

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [June 19, 2018, 8:00pm UTC](https://discourse.paraview.org/t/vector-glyph-orient-not-working/184/9 "2018-06-19T20:00:49Z")

</div>

> [@Chris\_Marsh](#):
>
> What does `-dr` do?

It is disabling loading configuration files that restore previous settings. Setting `PV_SETTINGS_DEBUG` environment variable will print out info on the terminal about files it loads during startup. Sometimes the crud that collects between versions can cause issues.

---

<div class="post-metadata">

### Author: ![Chris\_Marsh](https://discourse.paraview.org/user_avatar/discourse.paraview.org/chris_marsh/32/85_2.png) [@Chris\_Marsh](https://discourse.paraview.org/u/Chris_Marsh)
#### Post date: [June 19, 2018, 8:10pm UTC](https://discourse.paraview.org/t/vector-glyph-orient-not-working/184/10 "2018-06-19T20:10:39Z")

</div>

Gotcha. Quickly took a look at the -dr.ini file versus the non -dr one, as well as the main json config file. Nothing _obviously_ broken. I removed all the config files and it’s correctly working. Thanks very much for the help

---

<div class="post-metadata">

### Author: ![mark\_collier](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mark_collier/32/1499_2.png) [@mark\_collier](https://discourse.paraview.org/u/mark_collier)
#### Post date: [May 22, 2019, 5:20am UTC](https://discourse.paraview.org/t/vector-glyph-orient-not-working/184/11 "2019-05-22T05:20:31Z")

</div>

Hi I’m new to paraview and mostly have my data stored in netCDF. I’ve had reasonable success generating plots on the sphere, and are aiming to generate wind vectors (via glyphs) at different pressure levels. I’ve followed a note:

> **[Use Paraview to plot vector field in spherical geometry](https://phychai.wordpress.com/2013/08/01/paraview_vectorfield/)**
>
> It is easy to use paraview to draw vector fields in a cubic geometry. However, for spherical geometry, it is quite troublesome. This is because the utility glyph only recognize Cartesian coordinate…

  
closely as it is exactly what I am trying to do.  
This is currently what I see. The arrows point in the same direction, there should be changes in x/y direction.  
 ![53%20pm](https://discourse.paraview.org/uploads/default/original/2X/a/a6ce0dd55e7400692cd6d751d353d118cf7e6df4.jpeg)  
My pipeline is:  
 ![47%20pm](https://discourse.paraview.org/uploads/default/original/2X/3/3c1459b6756b4fd4ae8ad092b920e757e8e0e320.png)  
As my variables in two different files, I group them together with the filter. This seems to work as the variables (ucomp/vcomp) are both available to me.  
So the 200hPa selects out a single level (200hPa).  
The MakeVec follows the notes in the document above. This seems to work as ucomp and vcomp can both be plotted, they show up on a rectangular grid.  
Cart2Spherical puts the component on the sphere. Once again it allows me to choose b/w ucomp/vcomp.  
Then I try to glyph the result following the notes, and I get the figure above.  
Any help 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: [May 22, 2019, 9:04am UTC](https://discourse.paraview.org/t/vector-glyph-orient-not-working/184/12 "2019-05-22T09:04:08Z")

</div>

Well, you have to enable to Glyph Orientation and set the array to use. Did you do that ?

---

<div class="post-metadata">

### Author: ![mark\_collier](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mark_collier/32/1499_2.png) [@mark\_collier](https://discourse.paraview.org/u/mark_collier)
#### Post date: [May 22, 2019, 11:27am UTC](https://discourse.paraview.org/t/vector-glyph-orient-not-working/184/13 "2019-05-22T11:27:34Z")

</div>

is this something I set prior to applying the standard glyph filter to my Cart2Spherical filter as the drop down menu for Orientation Array has no option and says “No orientation array”? I have ucomp (partial) and vcomp (partial) available, shouldn’t the option to plot the glyphs come from these objects, I can see them in the Coloring drop down menu? Not sure what the (partial) refers to. Thanks

---

<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: [May 22, 2019, 11:35am UTC](https://discourse.paraview.org/t/vector-glyph-orient-not-working/184/14 "2019-05-22T11:35:02Z")

</div>

You need a (non-partial?) 3 component vector array to be able to orient your glyphs.

---

<div class="post-metadata">

### Author: ![Raffaele\_Sparago](https://discourse.paraview.org/user_avatar/discourse.paraview.org/raffaele_sparago/32/12431_2.png) [@Raffaele\_Sparago](https://discourse.paraview.org/u/Raffaele_Sparago)
#### Post date: [September 19, 2023, 11:01am UTC](https://discourse.paraview.org/t/vector-glyph-orient-not-working/184/15 "2023-09-19T11:01:14Z")

</div>

Hello, I’m new to Paraview and I’m having the same problem: glyphs are all X-oriented even if I selected an orientation vector.  
Could you tell me how do I run with the -dr dommand? Is it something you can do in the Python shell?

Thanks in advance!

---

<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: [September 19, 2023, 2:04pm UTC](https://discourse.paraview.org/t/vector-glyph-orient-not-working/184/16 "2023-09-19T14:04:17Z")

</div>

Welcome to the ParaView community, Raffaele!

You didn’t specify which operating system you are using, so I’ll assume linux.

To run ParaView with the `--dr` option, simply run at a terminal the command

```auto
> paraview --dr

```

Note that the `--dr` option now is specified with two dashes rather than one in recent versions of ParaView.
