我有这个:
\documentclass{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xlabel= $Interes$, ylabel=$Power$,
axis x line=bottom,
axis y line=left,
ultra thick,
y coord trafo/.code={\pgfmathparse{sqrt(#1)}},
y coord inv trafo/.code={\pgfmathparse{pow(#1,2)}}
]
\addplot coordinates {
(0,0)
(1,5)
(0.4,0.75)
};
\draw[red, dashed] (axis cs:0.5, 0)--(axis cs:0.5, 5);
\draw[red, dashed] (axis cs:0, 1.3)--(axis cs:1, 1.3);
\end{axis}
\end{tikzpicture}
\end{document}
我想删除连接点的自动线。我想删除“y”和“x”坐标
我想写下这些要点
非常感谢
答案1
我猜你需要命令only marks
中的键/选项addplot
。
\documentclass{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}[
xlabel= $Interes$, ylabel=$Power$,
axis x line=bottom,
axis y line=left,
ultra thick,
y coord trafo/.code={\pgfmathparse{sqrt(#1)}},
y coord inv trafo/.code={\pgfmathparse{pow(#1,2)}}
]
\addplot[only marks,blue] coordinates { % <-- the magic happens here
(0,0)
(1,5)
(0.4,0.75)
};
\draw[red, dashed] (axis cs:0.5, 0)--(axis cs:0.5, 5);
\draw[red, dashed] (axis cs:0, 1.3)--(axis cs:1, 1.3);
\end{axis}
\end{tikzpicture}
\end{document}