# Setting Transparency with a Selected Scalar Array

**URL:** https://discourse.paraview.org/t/setting-transparency-with-a-selected-scalar-array/599
**Category:** Development
**Created:** [September 18, 2018, 8:22pm UTC](https://discourse.paraview.org/t/setting-transparency-with-a-selected-scalar-array/599 "2018-09-18T20:22:49Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![banesullivan](https://discourse.paraview.org/user_avatar/discourse.paraview.org/banesullivan/32/11714_2.png) [@banesullivan](https://discourse.paraview.org/u/banesullivan)
#### Post date: [September 18, 2018, 8:22pm UTC](https://discourse.paraview.org/t/setting-transparency-with-a-selected-scalar-array/599/1 "2018-09-18T20:22:49Z")

</div>

I’m curious if there is a way to color a dataset by an attribute then set the opacity mapping via a separate array in the same dataset.

For example, I often have a volume of data with two arrays: the data array (e.g. some physical property like conductivity) and an array representing the uncertainty values. I would like to color my volume of data by the data array and set its transparency based on the uncertainty array.

Is there a way to do this in ParaView currently? If not, I was thinking I might create a [Python Algorithm plugin](https://gitlab.kitware.com/paraview/paraview/blob/master/Examples/Plugins/PythonAlgorithm/PythonAlgorithmExamples.py) to do this…my thought would be that the transparency would need to be set cellwise… is this possible/is there a good way to achieve my goal besides just adding a new RGBA array as I would like to still use predefined colormaps?

---

<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: [November 21, 2018, 9:45am UTC](https://discourse.paraview.org/t/setting-transparency-with-a-selected-scalar-array/599/2 "2018-11-21T09:45:46Z")

</div>

It actually is doable with volume representation and two components arrays.  
Here is how to test it :

- run ParaView

- Open [waveletElevation.vti](https://discourse.paraview.org/uploads/default/original/1X/b06f1ddd16d19afca1dfadeca551cdae938b0959.vti) (73.5 KB)

- Set representation type to Volume

- in the representation property, check “Multi Component Mapping”

- Edit Color Map

- Opacity and coloring are independant
