# Adding symbols to Line Chart axis labels

**URL:** https://discourse.paraview.org/t/adding-symbols-to-line-chart-axis-labels/6374
**Category:** ParaView Support
**Tags:** python
**Created:** [February 3, 2021, 6:05am UTC](https://discourse.paraview.org/t/adding-symbols-to-line-chart-axis-labels/6374 "2021-02-03T06:05:03Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![WhosYourData](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/b5ac83/32.png) [@WhosYourData](https://discourse.paraview.org/u/WhosYourData)
#### Post date: [February 3, 2021, 6:05am UTC](https://discourse.paraview.org/t/adding-symbols-to-line-chart-axis-labels/6374/1 "2021-02-03T06:05:03Z")

</div>

Hi folks

This is hopefully a quick question about Line Chart manipulation. We’re using ParaView 5.8.1 on Windows 10 x64 bit. We’d like to add the ‘degree’ symbol to an x-axis label, i.e. for degrees Celsius. However, pasting the symbol from MS Word into the viewport’s Axis Title input text field doesn’t work. I was wondering what character set is used for axes labels, and whether there’s an escape sequence for degrees that we can use in pvpython.

Thank you, and our apologies if this is a dum question - we couldn’t find it in the PV Guide  
Milan

---

<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 3, 2021, 9:23am UTC](https://discourse.paraview.org/t/adding-symbols-to-line-chart-axis-labels/6374/2 "2021-02-03T09:23:59Z")

</div>

Using the following works pefectly on Windows 10 x64 with ParaView v5.8.1 binaries.

`°C`

---

<div class="post-metadata">

### Author: ![WhosYourData](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/b5ac83/32.png) [@WhosYourData](https://discourse.paraview.org/u/WhosYourData)
#### Post date: [February 4, 2021, 3:19am UTC](https://discourse.paraview.org/t/adding-symbols-to-line-chart-axis-labels/6374/3 "2021-02-04T03:19:44Z")

</div>

Hi @mwestphal

Thanks for that! I was actually posting on behalf of a co-worker, I hadn’t tried the copy-and-paste method myself, which does in fact work.

However, using the degree symbol with a pvpython script file does not work on my laptop. The script is as follows, and is run as an external .py file via the Python Shell Panel:  
from paraview.simple import  
layout1 = GetLayout()  
renderView1 = GetActiveViewOrCreate(‘RenderView’)  
Delete(renderView1)  
del renderView1  
lineChartView1 = CreateView(‘XYChartView’)  
AssignViewToLayout(view=lineChartView1, layout=layout1, hint=0)  
lineChartView1.BottomAxisTitle = ‘Temp (degC)’  
lineChartView1.BottomAxisTitle = ‘Temp (°C)’

I get the following error message:  
“File “”, line 13  
SyntaxError: (unicode error) ‘utf-8’ codec can’t decode byte 0xb0 in position 6: invalid start byte” (see attached image)

Pasting the code directly into the Python Shell Panel just ignores the final code line without giving any error message.

Thanks again  
Milan  
[PV581\_GUItrace\_WinX64\_degError.py](https://discourse.paraview.org/uploads/short-url/iwBMdTx430ywh18LalnVQuxniQN.py) (353 Bytes)

 ![PV581_WinX64_DegError.](https://discourse.paraview.org/uploads/default/original/2X/f/f885e33b460d15ad2bd84f195a377345beb6c229.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: [February 4, 2021, 8:42am UTC](https://discourse.paraview.org/t/adding-symbols-to-line-chart-axis-labels/6374/4 "2021-02-04T08:42:41Z")

</div>

The following should work.

```auto
u"Temp (\N{DEGREE SIGN}C)"

```

In any case, it would be nice if it was more easy to use and the trace would not be invalid in that case.

---

<div class="post-metadata">

### Author: ![WhosYourData](https://discourse.paraview.org/letter_avatar_proxy/v4/letter/w/b5ac83/32.png) [@WhosYourData](https://discourse.paraview.org/u/WhosYourData)
#### Post date: [February 4, 2021, 11:33am UTC](https://discourse.paraview.org/t/adding-symbols-to-line-chart-axis-labels/6374/5 "2021-02-04T11:33:02Z")

</div>

Thank you for the quick response @mwestphal! It worked like a charm.  
(it seems we don’t need the ‘u’ prefix to the string, which makes it even better)

---

<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 4, 2021, 11:33am UTC](https://discourse.paraview.org/t/adding-symbols-to-line-chart-axis-labels/6374/6 "2021-02-04T11:33:39Z")

</div>

Yes, the u is implicit.
