# Using paraview I want to draw a two-dimensional polarization vector

**URL:** https://discourse.paraview.org/t/using-paraview-i-want-to-draw-a-two-dimensional-polarization-vector/3203
**Category:** ParaView Support
**Tags:** vtk
**Created:** [December 18, 2019, 9:09am UTC](https://discourse.paraview.org/t/using-paraview-i-want-to-draw-a-two-dimensional-polarization-vector/3203 "2019-12-18T09:09:06Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![Wendel1995l0829](https://discourse.paraview.org/user_avatar/discourse.paraview.org/wendel1995l0829/32/2614_2.png) [@Wendel1995l0829](https://discourse.paraview.org/u/Wendel1995l0829)
#### Post date: [December 18, 2019, 9:09am UTC](https://discourse.paraview.org/t/using-paraview-i-want-to-draw-a-two-dimensional-polarization-vector/3203/1 "2019-12-18T09:09:06Z")

</div>

Hello,  
I hope you can answer this question for me.  
I exported the VTK 2d vector image through Comsol.I want to rework the vector images by doing paraview.But you end up with a different image than you had in comsol.  
 ![IJR(%5BFQWEABP8PZL%7BVKK%7D3Q](https://discourse.paraview.org/uploads/default/original/2X/b/ba48f40a5dca95f89d7a90b7b51cf9251f33e418.png)  
This picture is what I want it to look like.But after paraview opens it, it becomes what it looks like below

 ![Q9%5DC()%2474_GT9IOACYKYH3B](https://discourse.paraview.org/uploads/default/original/2X/a/aa06f0f20126d2ec4268a273d74aa47769f8ec51.png)  
I hope to get your help and guidance.  
Thank you.

---

<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: [December 18, 2019, 9:13am UTC](https://discourse.paraview.org/t/using-paraview-i-want-to-draw-a-two-dimensional-polarization-vector/3203/2 "2019-12-18T09:13:34Z")

</div>

please share your dataset

---

<div class="post-metadata">

### Author: ![Wendel1995l0829](https://discourse.paraview.org/user_avatar/discourse.paraview.org/wendel1995l0829/32/2614_2.png) [@Wendel1995l0829](https://discourse.paraview.org/u/Wendel1995l0829)
#### Post date: [December 18, 2019, 9:29am UTC](https://discourse.paraview.org/t/using-paraview-i-want-to-draw-a-two-dimensional-polarization-vector/3203/3 "2019-12-18T09:29:54Z")

</div>

The following is my data set for your guidance  
[极化矢量箭头.txt](https://discourse.paraview.org/uploads/short-url/yC6HUPl4JGk9ZtaMiHkfnJ0i52j.txt) (96.9 KB)

---

<div class="post-metadata">

### Author: ![Wendel1995l0829](https://discourse.paraview.org/user_avatar/discourse.paraview.org/wendel1995l0829/32/2614_2.png) [@Wendel1995l0829](https://discourse.paraview.org/u/Wendel1995l0829)
#### Post date: [December 18, 2019, 9:33am UTC](https://discourse.paraview.org/t/using-paraview-i-want-to-draw-a-two-dimensional-polarization-vector/3203/5 "2019-12-18T09:33:58Z")

</div>

I added a part of the data set so you don’t have to download the previous file

 ![%7B%24S4~BZ0%7B7PE%25UWOOK23%256N](https://discourse.paraview.org/uploads/default/original/2X/c/cd770162d9f3231aea807bb3a5897c95b78eb379.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: [December 18, 2019, 9:44am UTC](https://discourse.paraview.org/t/using-paraview-i-want-to-draw-a-two-dimensional-polarization-vector/3203/6 "2019-12-18T09:44:21Z")

</div>

Can you share a statefile or a screenshot of your pipeline browser ?

---

<div class="post-metadata">

### Author: ![Wendel1995l0829](https://discourse.paraview.org/user_avatar/discourse.paraview.org/wendel1995l0829/32/2614_2.png) [@Wendel1995l0829](https://discourse.paraview.org/u/Wendel1995l0829)
#### Post date: [December 18, 2019, 10:32am UTC](https://discourse.paraview.org/t/using-paraview-i-want-to-draw-a-two-dimensional-polarization-vector/3203/7 "2019-12-18T10:32:47Z")

</div>

OK.THanks.

 ![A%5B88%24~2%5DVZF4%7D%40UN%7DA(LNFM](https://discourse.paraview.org/uploads/default/original/2X/a/aa993e8a5b12fb1623b425ea926e762a820a927a.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: [December 18, 2019, 11:08am UTC](https://discourse.paraview.org/t/using-paraview-i-want-to-draw-a-two-dimensional-polarization-vector/3203/8 "2019-12-18T11:08:34Z")

</div>

Can you share your .vtu ? How do you create this .vtu file ?

---

<div class="post-metadata">

### Author: ![Kenneth\_Moreland](https://discourse.paraview.org/user_avatar/discourse.paraview.org/kenneth_moreland/32/15033_2.png) [@Kenneth\_Moreland](https://discourse.paraview.org/u/Kenneth_Moreland)
#### Post date: [December 18, 2019, 2:42pm UTC](https://discourse.paraview.org/t/using-paraview-i-want-to-draw-a-two-dimensional-polarization-vector/3203/9 "2019-12-18T14:42:41Z")

</div>

I think the main problem is that you need to set the `Orientation Array` for the `Glyph` filter. If the `Glyph` filter is not letting you set the `Orientation Array`, then you probably first have to [create a vector from scalar fields using the calculator filter](https://www.paraview.org/Wiki/Advanced_Tips_and_Tricks#Creating_vectors_from_2_or_3_scalars).

I could not read your text file into ParaView directly, but I was able to process it enough to make a csv file that I got into ParaView. Below are a state file that demonstrates your data with orientated glyphs and the data file I loaded into ParaView.

[polarized\_vector\_arrow.pvsm](https://discourse.paraview.org/uploads/short-url/xHrldHVCbSder8Muyc24AqXM9tH.pvsm) (344.8 KB)  
[polarized\_vector\_arrow.csv](https://discourse.paraview.org/uploads/short-url/7Lz7fJOVLrIUtx8u4ikQAPXYKoX.csv) (31.7 KB)

Here is the output I got:

 ![Capture](https://discourse.paraview.org/uploads/default/original/2X/8/85b8a50fb6e0ef03e1c8edd1e2a98855898f6cf8.png)
