
這是我的程式碼。
\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}}
我想要用攝氏符號代替文字。我該怎麼做?
答案1
只需使用\textdegree{}C
\usepackage{textcomp}
請注意,您需要在文件的序言中 註明。
答案2
這裡還有另外兩個選項:
$44.9^\circ$C
\SI{44.9}{\celsius} % \usepackage{siunitx}
我更喜歡第二個(如果無論如何使用 siunitx)。
答案3
答案4
我使用該amsmath
包並像這樣使用它(將25
和替換C
為您需要的任何內容):
$25^\text{o}C
它看起來是這樣的:
25 ℃
我認為它看起來很像真正的度數符號,而且相當簡單。