# Annotate text based on else/if condition

**URL:** https://discourse.paraview.org/t/annotate-text-based-on-else-if-condition/10425
**Category:** ParaView Support
**Created:** [September 28, 2022, 6:23pm UTC](https://discourse.paraview.org/t/annotate-text-based-on-else-if-condition/10425 "2022-09-28T18:23:02Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Trailer1](https://discourse.paraview.org/user_avatar/discourse.paraview.org/trailer1/32/5143_2.png) [@Trailer1](https://discourse.paraview.org/u/Trailer1)
#### Post date: [September 28, 2022, 6:23pm UTC](https://discourse.paraview.org/t/annotate-text-based-on-else-if-condition/10425/1 "2022-09-28T18:23:02Z")

</div>

Hello to all,

I would like to annotate some text based on the time of my simulation.

If my time is less or equal to 1 annotate: “one”  
if my time is more than 1 annotate: “two”

How can I achieve this? Would it be possible with python annotation?

Best Regards

---

<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 28, 2022, 7:57pm UTC](https://discourse.paraview.org/t/annotate-text-based-on-else-if-condition/10425/2 "2022-09-28T19:57:33Z")

</div>

**Python Annotation** with the Expression set to `"one" if time_value <= 1 else "two"` will do the trick.

---

<div class="post-metadata">

### Author: ![Trailer1](https://discourse.paraview.org/user_avatar/discourse.paraview.org/trailer1/32/5143_2.png) [@Trailer1](https://discourse.paraview.org/u/Trailer1)
#### Post date: [September 29, 2022, 8:55am UTC](https://discourse.paraview.org/t/annotate-text-based-on-else-if-condition/10425/3 "2022-09-29T08:55:11Z")

</div>

hi,

Thanks for the reply!!

Would it be possible to allocate colors to it? “one” green, “two” red?

---

<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 29, 2022, 7:18pm UTC](https://discourse.paraview.org/t/annotate-text-based-on-else-if-condition/10425/4 "2022-09-29T19:18:17Z")

</div>

> [@Trailer1](#):
>
> Would it be possible to allocate colors to it? “one” green, “two” red?

Not through an expression, I’m afraid.

---

<div class="post-metadata">

### Author: ![Trailer1](https://discourse.paraview.org/user_avatar/discourse.paraview.org/trailer1/32/5143_2.png) [@Trailer1](https://discourse.paraview.org/u/Trailer1)
#### Post date: [September 30, 2022, 8:48am UTC](https://discourse.paraview.org/t/annotate-text-based-on-else-if-condition/10425/5 "2022-09-30T08:48:45Z")

</div>

Ok. Thanks for help
