我想在这个图表的顶部、底部、左侧和右侧绘制标题。不幸的是,我似乎什么都画不出来:
梅威瑟:
\begin{document}
\begin{tikzpicture}
\begin{axis}[axis x line=bottom,
axis y line=left,
domain=0:1,
axis on top,xmin=0]
\addplot[pattern=crosshatch,
pattern color=red!30!white,
draw=red!30!white]
{x^e} \closedcycle;
\node[anchor=north west] at (-.5,-1.5) {$\iota$};
\end{axis}
\begin{axis}[
axis x line=top,
axis y line=right,
domain=0:1,
x dir = reverse,
y dir = reverse,
axis on top,xmin=0]
\addplot[pattern=crosshatch,
pattern color=blue!30!white,
draw=blue!30!white]
{x^e} \closedcycle;
\end{axis}
\end{tikzpicture}
\end{document}
答案1
我可能误解了这个问题,但是这在轴的左边、右边等等处添加了一些内容。
\documentclass[tikz,border=3.14mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\usetikzlibrary{patterns,positioning}
\begin{document}
\begin{tikzpicture}
\begin{axis}[axis x line=bottom,
axis y line=left,
domain=0:1,
axis on top,xmin=0]
\addplot[pattern=crosshatch,
pattern color=red!30!white,
draw=red!30!white]
{x^e} \closedcycle;
\node[anchor=north west] at (-.5,-1.5) {$\iota$};
\end{axis}
\begin{axis}[
axis x line=top,
axis y line=right,
domain=0:1,
x dir = reverse,
y dir = reverse,
axis on top,xmin=0]
\addplot[pattern=crosshatch,
pattern color=blue!30!white,
draw=blue!30!white]
{x^e} \closedcycle;
\end{axis}
\node[right=1em of current axis]{something right};
\node[left=1em of current axis]{something left};
\node[above=1em of current axis]{something above};
\node[below=1em of current axis]{something below};
\end{tikzpicture}
\end{document}