9

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
13

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 '19 at 2:08
  • @JonWong if having "no command layer between input and semantics" is your personal aim, don't use tex – user177954 Jan 23 '19 at 13:29
18

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
2

Most is said already, but it's worth mentioning, that $^\circ$ and \textdegree{} yield different symbols: circ vs textdegree

So either

\usepackage{textcomp}
44.9 \textcelsius{}

or

\usepackage{siunitx}
\SI{44.9}{\celsius}

or if the exact typesetting is not important, this works as well:

$44.9\, ^\circ$C

If the curly brackets are omitted after \textdegree{} the space behind is ignored. \textdegree\ does the same job.

0

similar to @sergej, for using the siunitx package,

I use \SI{4.9}{\degreeCelsius}

or you can also use \usepackage{textcomp} and \textcelsius

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.