我尝试插入一个布尔值Title=true|false
:
\pgfplotsset{
%/pgfplots/.cd, % no effect
Title/.is choice,
Title/.style={title={A title.}},
}
为什么Title
、 Title=true
和Title=false
不起作用,而我两次都获得了标题?
我需要做些什么改进?
\documentclass[border=3.14pt]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=newest}
\begin{document}
\pgfplotsset{
%/pgfplots/.cd, % no effect
Title/.is choice,
Title/.style={title={A title.}},
}
\begin{tikzpicture}
\begin{axis}[Title=true]
\addplot[] {x} node[pos=0.5]{Has a title. :)};;
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[Title=false]
\addplot[red] {x} node[pos=0.5]{Has a title too. :(};
\end{axis}
\end{tikzpicture}