# How to insert degree Celsius symbol in node text in pgfplots/tikz?

Here is my code.

\resizebox{\textwidth}{!}{
\begin{tikzpicture}
\selectcolormodel{gray}
\begin{axis}[xlabel=Voltage,ylabel=Current,title=IV Characteristics of PV Module]
\node[label={Set 1}] at (axis cs:2,60){};
\node[label=Set 2] at (axis cs:2,150){};
\node[label=Set 3] at (axis cs:2,240){};
\node[label=Set 4] at (axis cs:2,305){};
\addplot table [x=v1,y=i1, col sep=comma,mark=none] {SolarCellIV.csv};
\addplot table [x=v2,y=i2, col sep=comma,mark=none] {SolarCellIV.csv};
\addplot table [x=v3,y=i3, col sep=comma,mark=none] {SolarCellIV.csv};
\addplot table [x=v4,y=i4, col sep=comma,mark=none] {SolarCellIV.csv};
\node at (axis cs:12,360) {Set 1: 44.9 degreeCelsius};
\end{axis}
\end{tikzpicture}}


I want the symbol for Degree Celsius in place of the text. How do I do so?

• Pls include complete (\begin document, \end document, \usepackage...) otherwise we can't run your code. – vaettchen Aug 2 '15 at 5:53

Just use \textdegree{}C

Attention, you need to say \usepackage{textcomp} in your document's preamble.

• Forces OP to give up initial aim of having "no command layer between input and semantics". See my explanation of WYSIWYM vs WYSIWYG – user152148 Jan 23 at 2:08
• @JonWong if having "no command layer between input and semantics" is your personal aim, don't use tex – user177954 Jan 23 at 13:29

Here are two other options:

$44.9^\circ$C
\SI{44.9}{\celsius} % \usepackage{siunitx}


I prefer the second one (if siunitx is used anyway).

• \celsius is enough for siunitx and you do not need math mode. – MaxNoe Aug 2 '15 at 12:59
• I liked the first one better. One less package to load helps speeding up execution times when you are dealing with big projects. – ivbc Mar 4 '18 at 15:30