I have a some data plotted with pgfplots
. I would like to make the title two lines. Can this be done? I tried adding \\
in the title command but that did nothing. Additionally, I couldn't find anything in the manual.
In my axis
command, I have the option title = {text \\ text}
where I want to split the title.
\documentclass[tikz]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat = 1.10}
\begin{document}
\begin{tikzpicture}
\begin{axis}[title = {text \\ text}]
\addplot[smooth, samples = 100, domain = 0:2] (\x, 2);
\end{axis}
\end{document}
Best Answer
Add
align=center
does the trick:Code: