# Value change being displayed

**URL:** https://discourse.paraview.org/t/value-change-being-displayed/3620
**Category:** ParaView Support
**Tags:** python, vtk
**Created:** [February 20, 2020, 8:12pm UTC](https://discourse.paraview.org/t/value-change-being-displayed/3620 "2020-02-20T20:12:14Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![Samanvith\_A](https://discourse.paraview.org/user_avatar/discourse.paraview.org/samanvith_a/32/2378_2.png) [@Samanvith\_A](https://discourse.paraview.org/u/Samanvith_A)
#### Post date: [February 20, 2020, 8:12pm UTC](https://discourse.paraview.org/t/value-change-being-displayed/3620/1 "2020-02-20T20:12:14Z")

</div>

I have seven files which is a 3d gridded data, which changes from Z = 1 to 7. I have created the animation of change in the data.  
I want to display the change in value i.e Z = 1 to 7 in the animation view.  
How can I do 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: [February 21, 2020, 2:45am UTC](https://discourse.paraview.org/t/value-change-being-displayed/3620/2 "2020-02-21T02:45:07Z")

</div>

Can you describe more precisely what you are trying to achieve here ?  
Maybe you can share your data and/or a screenshot to show what you want.

---

<div class="post-metadata">

### Author: ![Samanvith\_A](https://discourse.paraview.org/user_avatar/discourse.paraview.org/samanvith_a/32/2378_2.png) [@Samanvith\_A](https://discourse.paraview.org/u/Samanvith_A)
#### Post date: [February 21, 2020, 10:20am UTC](https://discourse.paraview.org/t/value-change-being-displayed/3620/3 "2020-02-21T10:20:21Z")

</div>

I have attached an image for reference.  
I have 7 sets of similar 3d data, for 7 different redshifts, z = 0 to 7.  
I have created an animation where the changes in the data for 7 redshifts is shown.  
I can only see the change in the data for a particular time. But I want to show the change in the redshift i.e z =0, z = 1 up-to z =7 in the animation as the time interval changes  
I hope I am able to reach you now.

 ![Paraview](https://discourse.paraview.org/uploads/default/original/2X/5/50011dc3699b038a2020e21ff0d911a86530a2df.jpeg)

---

<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: [February 21, 2020, 10:28am UTC](https://discourse.paraview.org/t/value-change-being-displayed/3620/4 "2020-02-21T10:28:56Z")

</div>

Are you looking for the FIlter -\> TemporalInterpolator ?

Then in the animation view, switch mode to RealTime.

---

<div class="post-metadata">

### Author: ![Samanvith\_A](https://discourse.paraview.org/user_avatar/discourse.paraview.org/samanvith_a/32/2378_2.png) [@Samanvith\_A](https://discourse.paraview.org/u/Samanvith_A)
#### Post date: [February 21, 2020, 4:32pm UTC](https://discourse.paraview.org/t/value-change-being-displayed/3620/5 "2020-02-21T16:32:53Z")

</div>

Hey @mwestphal

I have shared a link with you of an animation. Its an example animation ( not done by me ).  
In the top right corner of the animation the value of the ’ Z " changes as the animation progress with time.  
That’s exactly what I want to do in my animation using ParaView.  
[https://drive.google.com/open?id=1YOs8aSCQRQGgB-svjDfsVkW1wiHN0jhK](https://drive.google.com/open?id=1YOs8aSCQRQGgB-svjDfsVkW1wiHN0jhK)

---

<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: [February 21, 2020, 6:44pm UTC](https://discourse.paraview.org/t/value-change-being-displayed/3620/6 "2020-02-21T18:44:07Z")

</div>

You can add an **Annotate Time** filter and set the **Format** property to “z=%f”. The “%f” is a C printf-style format string, so you can adjust the number of digits presented.

---

<div class="post-metadata">

### Author: ![Samanvith\_A](https://discourse.paraview.org/user_avatar/discourse.paraview.org/samanvith_a/32/2378_2.png) [@Samanvith\_A](https://discourse.paraview.org/u/Samanvith_A)
#### Post date: [February 21, 2020, 8:13pm UTC](https://discourse.paraview.org/t/value-change-being-displayed/3620/7 "2020-02-21T20:13:20Z")

</div>

Hey @cory.quammen

That helped me.  
But I have another query. The value of my Z goes from 10 to 4, i.e in decreasing order.  
Can I know, how can I do it ?

---

<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: [February 21, 2020, 8:26pm UTC](https://discourse.paraview.org/t/value-change-being-displayed/3620/8 "2020-02-21T20:26:28Z")

</div>

You can instead use the **Python Annotation** filter with an **Expression** like “10 - time\_index + 4”.

---

<div class="post-metadata">

### Author: ![Samanvith\_A](https://discourse.paraview.org/user_avatar/discourse.paraview.org/samanvith_a/32/2378_2.png) [@Samanvith\_A](https://discourse.paraview.org/u/Samanvith_A)
#### Post date: [February 22, 2020, 2:06pm UTC](https://discourse.paraview.org/t/value-change-being-displayed/3620/9 "2020-02-22T14:06:00Z")

</div>

Hey @cory.quammen

I am getting a lot of errors when I used the following method.  
I have shared my data with you.  
[https://drive.google.com/drive/folders/1eN79xMyed0Uj9Uyugv5YSskwtzXsquTn?usp=sharing](https://drive.google.com/drive/folders/1eN79xMyed0Uj9Uyugv5YSskwtzXsquTn?usp=sharing)

" Here is the error that I am facing "  
`Failed to evaluate expression '10 - time_index + 4'. The following exception stack should provide additional developer specific information. This typically implies a malformed expression. Verify that the expression is valid.`

Variables in current scope are [‘input’, ‘time\_value’, ‘t\_value’, ‘time\_steps’, ‘t\_steps’, ‘time\_range’, ‘t\_range’, ‘Halodensity’]

```
Traceback (most recent call last):
  File "E:\Studies\ParaView-5.7.0-Windows-Python3.7-msvc2015-64bit\bin\Lib\site-packages\paraview\detail\annotation.py", line 95, in execute
    result = calculator.compute(inputs, expression, ns=ns)
  File "E:\Studies\ParaView-5.7.0-Windows-Python3.7-msvc2015-64bit\bin\Lib\site-packages\paraview\detail\calculator.py", line 143, in compute
    retVal = eval(expression, globals(), mylocals)
  File "<string>", line 1, in <module>
NameError: name 'time_index' is not defined
```

---

<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: [February 24, 2020, 2:01pm UTC](https://discourse.paraview.org/t/value-change-being-displayed/3620/10 "2020-02-24T14:01:05Z")

</div>

I can load the three files you shared as a time series, ran them through a **Table to Points** filter to see something in the render view, then added a **Python Annotation** filter to the **Table to Points** filter. Setting the **Expression** property to `10 - time_index + 4` works as expected. There must be something else in your use of ParaView that I am missing.

Could you save your work in a state file (File -\> Save State…) and share that as well?

---

<div class="post-metadata">

### Author: ![Samanvith\_A](https://discourse.paraview.org/user_avatar/discourse.paraview.org/samanvith_a/32/2378_2.png) [@Samanvith\_A](https://discourse.paraview.org/u/Samanvith_A)
#### Post date: [February 25, 2020, 9:41am UTC](https://discourse.paraview.org/t/value-change-being-displayed/3620/11 "2020-02-25T09:41:13Z")

</div>

@cory.quammen

Here is the attachment of the state file.  
The animation made in which I have kept is Sequence mode.  
[ParaView.pvsm](https://discourse.paraview.org/uploads/short-url/cESOsAYbjM1BYPwEPD0vTwW1Gsp.pvsm) (287.6 KB)

---

<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: [February 27, 2020, 3:22am UTC](https://discourse.paraview.org/t/value-change-being-displayed/3620/12 "2020-02-27T03:22:27Z")

</div>

Thanks, that was helpful. I see what is happening.

It appears that `time_index` is available only when the **Mode** in the _Animation View_ is set to “Snap to TimeSteps”. When I loaded your state file, the **Mode** was set to “Sequence”. “Snap to TimeSteps” ensures that ParaView’s time is set to a time defined by the dataset (in this case, 0, 1, 2, 3… and so on). That assumption is required to make `time_index` defined. “Sequence” mode, on the other hand, allows ParaView’s time to be set to times not defined by datasets.

Just make sure that your _Animation View_ **Mode** is set to “Snap to TimeSteps” and it should work.

---

<div class="post-metadata">

### Author: ![Samanvith\_A](https://discourse.paraview.org/user_avatar/discourse.paraview.org/samanvith_a/32/2378_2.png) [@Samanvith\_A](https://discourse.paraview.org/u/Samanvith_A)
#### Post date: [February 29, 2020, 5:20pm UTC](https://discourse.paraview.org/t/value-change-being-displayed/3620/13 "2020-02-29T17:20:43Z")

</div>

@cory.quammen

You’re right. But I want the animation to be made through sequence mode rather than snap to timesteps mode. Because the animation created through this mode is not quite appealing.  
So is there any ways to do the required in Sequence mode of animation  
?

---

<div class="post-metadata">

### Author: ![Samanvith\_A](https://discourse.paraview.org/user_avatar/discourse.paraview.org/samanvith_a/32/2378_2.png) [@Samanvith\_A](https://discourse.paraview.org/u/Samanvith_A)
#### Post date: [March 1, 2020, 4:34pm UTC](https://discourse.paraview.org/t/value-change-being-displayed/3620/14 "2020-03-01T16:34:06Z")

</div>

@mwestphal @cory.quammen

It would be really helpful if I get some comments on my query, as I am working on my Master thesis project.

---

<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: [March 2, 2020, 2:44am UTC](https://discourse.paraview.org/t/value-change-being-displayed/3620/15 "2020-03-02T02:44:36Z")

</div>

Use `time_value` instead, as you mentioned it to be available.
