# Is it possible to add labels to contour lines?

**URL:** https://discourse.paraview.org/t/is-it-possible-to-add-labels-to-contour-lines/1466
**Category:** ParaView Support
**Created:** [March 13, 2019, 6:13pm UTC](https://discourse.paraview.org/t/is-it-possible-to-add-labels-to-contour-lines/1466 "2019-03-13T18:13:50Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![gromaxe](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/g/90ced4/32.png) [@gromaxe](https://discourse.paraview.org/u/gromaxe)
#### Post date: [March 13, 2019, 6:13pm UTC](https://discourse.paraview.org/t/is-it-possible-to-add-labels-to-contour-lines/1466/1 "2019-03-13T18:13:50Z")

</div>

Hello everyone!

I’m trying to make a visualization of ocean and i’m stuck at labeling contour lines.  
For one frame i can add them manually via Text source.

Is there any way to do it automatically?

Expectation:

 ![image](https://discourse.paraview.org/uploads/default/original/2X/1/13f6be039f7f1edc74aa9f0fbef532b07d102998.jpeg)  
Reality:  
 ![image](https://discourse.paraview.org/uploads/default/original/2X/2/239a32c1f8b199e3a52c906c8f771efdbcae929f.jpeg)

---

<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: [March 13, 2019, 7:43pm UTC](https://discourse.paraview.org/t/is-it-possible-to-add-labels-to-contour-lines/1466/2 "2019-03-13T19:43:42Z")

</div>

@danlipsa @Scott_Wittenburg Is there anything available in ParaView 5.6 or upcoming in 5.7?

---

<div class="post-metadata">

### Author: ![wascott](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/8e8cbc/32.png) [@wascott](https://discourse.paraview.org/u/wascott)
#### Post date: [March 13, 2019, 8:07pm UTC](https://discourse.paraview.org/t/is-it-possible-to-add-labels-to-contour-lines/1466/3 "2019-03-13T20:07:11Z")

</div>

Excellent question!!! Here is the feature request, that has been pushed off for a few years. [https://gitlab.kitware.com/paraview/paraview/issues/15810](https://gitlab.kitware.com/paraview/paraview/issues/15810). It comes from uservoice, here: [https://paraview.uservoice.com/forums/11350-general/suggestions/1350851-create-the-ability-to-automatically-label-contour](https://paraview.uservoice.com/forums/11350-general/suggestions/1350851-create-the-ability-to-automatically-label-contour).

I’m pretty sure this will slip. There just isn’t time to get it into the spring release, and the fall release will be a smaller release, trying to get back on schedule. After that, this feature is towards the top of the queue.

---

<div class="post-metadata">

### Author: ![Aashish\_Chaudhary](https://discourse.paraview.org/user_avatar/discourse.paraview.org/aashish_chaudhary/32/300_2.png) [@Aashish\_Chaudhary](https://discourse.paraview.org/u/Aashish_Chaudhary)
#### Post date: [March 14, 2019, 1:42am UTC](https://discourse.paraview.org/t/is-it-possible-to-add-labels-to-contour-lines/1466/4 "2019-03-14T01:42:22Z")

</div>

@igor @cory.quammen yes we do have support for contour labels as it can be seen here: [https://vtk.org/Wiki/VTK/Examples/Cxx/Visualization/LabelContours](https://vtk.org/Wiki/VTK/Examples/Cxx/Visualization/LabelContours) but it is not exposed to Paraview. @danlipsa lets plan on adding support for this in Paraview sometime soon.

---

<div class="post-metadata">

### Author: ![gromaxe](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/g/90ced4/32.png) [@gromaxe](https://discourse.paraview.org/u/gromaxe)
#### Post date: [March 14, 2019, 3:21am UTC](https://discourse.paraview.org/t/is-it-possible-to-add-labels-to-contour-lines/1466/5 "2019-03-14T03:21:54Z")

</div>

Can it be done via Python shell?  
I am new to Paraview and for now I don’t know what Python shell is for 😅

---

<div class="post-metadata">

### Author: ![danlipsa](https://discourse.paraview.org/user_avatar/discourse.paraview.org/danlipsa/32/1563_2.png) [@danlipsa](https://discourse.paraview.org/u/danlipsa)
#### Post date: [March 14, 2019, 2:03pm UTC](https://discourse.paraview.org/t/is-it-possible-to-add-labels-to-contour-lines/1466/6 "2019-03-14T14:03:07Z")

</div>

@Aashish Chaudhary Yes, that would be great.

---

<div class="post-metadata">

### Author: ![vrkssai](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/v/e19b73/32.png) [@vrkssai](https://discourse.paraview.org/u/vrkssai)
#### Post date: [March 23, 2019, 3:32pm UTC](https://discourse.paraview.org/t/is-it-possible-to-add-labels-to-contour-lines/1466/7 "2019-03-23T15:32:22Z")

</div>

Anyway we could try to label the contour, as a stopgap solution for now?

---

<div class="post-metadata">

### Author: ![vrkssai](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/v/e19b73/32.png) [@vrkssai](https://discourse.paraview.org/u/vrkssai)
#### Post date: [March 25, 2019, 3:55pm UTC](https://discourse.paraview.org/t/is-it-possible-to-add-labels-to-contour-lines/1466/8 "2019-03-25T15:55:10Z")

</div>

@gromaxe Did you find anything helpful for adding labels to contours, asking as a fellow user trying to do the same?

---

<div class="post-metadata">

### Author: ![gromaxe](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/g/90ced4/32.png) [@gromaxe](https://discourse.paraview.org/u/gromaxe)
#### Post date: [March 25, 2019, 3:59pm UTC](https://discourse.paraview.org/t/is-it-possible-to-add-labels-to-contour-lines/1466/9 "2019-03-25T15:59:42Z")

</div>

Only static ones via text source

As for now I just set colorbar marks to the same values as contour lines

---

<div class="post-metadata">

### Author: ![Kenichiro-Yoshimi](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/k/ecc23a/32.png) [@Kenichiro-Yoshimi](https://discourse.paraview.org/u/Kenichiro-Yoshimi)
#### Post date: [March 26, 2019, 12:31am UTC](https://discourse.paraview.org/t/is-it-possible-to-add-labels-to-contour-lines/1466/10 "2019-03-26T00:31:16Z")

</div>

A possible solution according to the old mailing list:

1. Cut all contour lines with the slice filter.
2. Select the points on the slice that you want to label.
3. Turn on Find Data and show “Point Labels” with the contour variable, and if you need, set the “Point Label Format” and modify the “Point Label Font” in the advanced settings (with gear icon).

 ![contour_labels](https://discourse.paraview.org/uploads/default/original/2X/e/e89b9b0a1c99c59e7a6e9b79c50715121c96f258.png)

---

<div class="post-metadata">

### Author: ![gromaxe](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/g/90ced4/32.png) [@gromaxe](https://discourse.paraview.org/u/gromaxe)
#### Post date: [March 26, 2019, 6:16am UTC](https://discourse.paraview.org/t/is-it-possible-to-add-labels-to-contour-lines/1466/11 "2019-03-26T06:16:11Z")

</div>

Thank you, will try that!

---

<div class="post-metadata">

### Author: ![wascott](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/8e8cbc/32.png) [@wascott](https://discourse.paraview.org/u/wascott)
#### Post date: [March 26, 2019, 5:59pm UTC](https://discourse.paraview.org/t/is-it-possible-to-add-labels-to-contour-lines/1466/12 "2019-03-26T17:59:15Z")

</div>

Hate to say this, but I’m being slow. Mind giving more detailed directions, using disk\_out\_ref.exo, so I can replicate? Thanks! Alan

---

<div class="post-metadata">

### Author: ![gromaxe](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/g/90ced4/32.png) [@gromaxe](https://discourse.paraview.org/u/gromaxe)
#### Post date: [March 26, 2019, 6:03pm UTC](https://discourse.paraview.org/t/is-it-possible-to-add-labels-to-contour-lines/1466/13 "2019-03-26T18:03:39Z")

</div>

Alan, I’m sorry, but don’t understand what exactly you are going to replicate. And I have no .exo files(

---

<div class="post-metadata">

### Author: ![vrkssai](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/v/e19b73/32.png) [@vrkssai](https://discourse.paraview.org/u/vrkssai)
#### Post date: [March 26, 2019, 6:55pm UTC](https://discourse.paraview.org/t/is-it-possible-to-add-labels-to-contour-lines/1466/14 "2019-03-26T18:55:21Z")

</div>

I’m sorry could you elaborate please, I don’t seem to understand how to select the points I want to label on the contour lines.

---

<div class="post-metadata">

### Author: ![wascott](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/8e8cbc/32.png) [@wascott](https://discourse.paraview.org/u/wascott)
#### Post date: [March 26, 2019, 7:30pm UTC](https://discourse.paraview.org/t/is-it-possible-to-add-labels-to-contour-lines/1466/15 "2019-03-26T19:30:15Z")

</div>

Everyone has access to disk\_out\_ref.exo. It comes with ParaView by default. File/ Open then, in the upper left corner, is Examples.

OK, after staring at it long enough, I did figure out what Kyoshimi is saying. Here are the steps to replicate what is above: Not necessarily easy or intuitive. Further, you can’t turn off the selection - but you can change the color (say to black) in the Color Palette editor.

- ParaView 5.6.0, Linux, builtin server (will work remote server)
- File/ Open/ Examples/ disk\_out\_ref.exo. All variables on. Apply.  
Now, we want to acquire a 2d surface. We will “paint” the contours on here.
- Slice. Z-Normal. Show Plane off. Apply.  
We are going to contour by Temp, so lets paint by the same. Reset to get the slice to be a good size.
- Paint by Temp. Reset.  
Create the contours on Temp. Notice that we want more than one contour. These will be 1d lines.
- Contour. Contour by: Temp. Delete the current value, add range. Use 8 Steps. Check the Compute Scalars checkbox. Apply.
- Color by Solid Color (we want white lines). Turn visibility ON for the Slice.  
Notice the stitching on the lines.
- Click on Contour in the pipeline browser. In the properties tab, Advanced tab, Transforming, change Translation Z to 0.001.  
Now, we want to find the cells along a line, through the contour lines. We will then label these. For fun, lets make the slice at 45 degrees. Although hard to see, we are going to extract about 12 to 16 points.
- Slice. Change Normal to 0.707, 0.707, 0.0. Apply. Turn off show plane.
- Select Cells On. Rubber band select the whole screen. Now, all points are selected.
- Find Data. Point Labels. Temp.
- Be sure that visibility is ON for Slice, Contour and the second Slice.  
 ![PNG](https://discourse.paraview.org/uploads/default/original/2X/2/2f33b31702eaa3d65e4aec85727a21f5fed1d559.jpeg)

---

<div class="post-metadata">

### Author: ![Kenichiro-Yoshimi](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/k/ecc23a/32.png) [@Kenichiro-Yoshimi](https://discourse.paraview.org/u/Kenichiro-Yoshimi)
#### Post date: [March 26, 2019, 10:11pm UTC](https://discourse.paraview.org/t/is-it-possible-to-add-labels-to-contour-lines/1466/16 "2019-03-26T22:11:55Z")

</div>

I’m sorry I didn’t make it clear enough.

@wascott  
I am grateful that you compensated my lack of explanation to replicate.

---

<div class="post-metadata">

### Author: ![wascott](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/8e8cbc/32.png) [@wascott](https://discourse.paraview.org/u/wascott)
#### Post date: [March 26, 2019, 10:24pm UTC](https://discourse.paraview.org/t/is-it-possible-to-add-labels-to-contour-lines/1466/17 "2019-03-26T22:24:41Z")

</div>

No problem. Thanks for giving me the idea (and remembering it was in the old mailing list.). I had never seen it done before.

---

<div class="post-metadata">

### Author: ![vrkssai](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/v/e19b73/32.png) [@vrkssai](https://discourse.paraview.org/u/vrkssai)
#### Post date: [March 27, 2019, 3:51pm UTC](https://discourse.paraview.org/t/is-it-possible-to-add-labels-to-contour-lines/1466/18 "2019-03-27T15:51:58Z")

</div>

Firstly, Thank you for the wonderful explanation but I 'm not sure where to do this,

> "Select Cells On.

Rubber band select the whole screen. Now, all points are selected."

---

<div class="post-metadata">

### Author: ![wascott](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/8e8cbc/32.png) [@wascott](https://discourse.paraview.org/u/wascott)
#### Post date: [March 27, 2019, 3:55pm UTC](https://discourse.paraview.org/t/is-it-possible-to-add-labels-to-contour-lines/1466/19 "2019-03-27T15:55:25Z")

</div>

Little icon, top left’ish of the 3d view. Tutorial (found from Help/ Sandia National Labs Tutorials/ Data Analysis) is here: [https://www.paraview.org/Wiki/Advanced\_Data\_Analysis#Cell.2C\_Point\_and\_Block\_Selections](https://www.paraview.org/Wiki/Advanced_Data_Analysis#Cell.2C_Point_and_Block_Selections)

---

<div class="post-metadata">

### Author: ![vrkssai](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/v/e19b73/32.png) [@vrkssai](https://discourse.paraview.org/u/vrkssai)
#### Post date: [March 27, 2019, 4:07pm UTC](https://discourse.paraview.org/t/is-it-possible-to-add-labels-to-contour-lines/1466/20 "2019-03-27T16:07:27Z")

</div>

Found it! Was able to label contours! Kudos to the person who came up with this, but we definitely need an easier way.

[Next page](https://discourse.paraview.org/t/is-it-possible-to-add-labels-to-contour-lines/1466.md?page=2)
