大きなデータ テーブルのプロット内のポイントにポイント ラベルを追加する

大きなデータ テーブルのプロット内のポイントにポイント ラベルを追加する

データ テーブル: (X 軸: 中間スパン変位、Y 軸: 荷重)https://pastebin.com/2WSvSBcn

この図のように、このプロットの特定のポイントにデータ ポイント ラベルを作成しようとしています。https://i.stack.imgur.com/lFsED.png

\documentclass{article}
\usepackage{pgfplots}
\usepackage{filecontents}


\begin{document}
\pgfplotsset{width=10cm,compat=newest}



\begin{center}
\begin{tikzpicture}
\begin{axis}[
  scale only axis,
  xlabel={Displacement ($mm$)},
  ylabel={Load ($kN$)},
  legend style={legend pos=south east},
]
\addplot[smooth, solid]
  table[x index=3,y index=1] {dat_25n02.txt};
\legend{25-N-0}
\end{axis}
\end{tikzpicture}
\end{center}


\end{document}

dat.txtには1000以上のデータポイントがあります(上記リンク)

曲線

答え1

これはノードとラベルを追加する方法です。何か問題があればお知らせください。

\documentclass{article}
\usepackage{pgfplots}
\pgfplotsset{width=10cm,compat=1.18}

\begin{document}
\begin{center}
\begin{tikzpicture}
\begin{axis}[
scale only axis,
xlabel={Displacement ($mm$)},
ylabel={Load ($kN$)},
legend style={legend pos=south east},
]
\addplot[smooth, solid]
table[x index=3,y index=1] {dat_25n02.txt};
\legend{25-N-0}
%%%%%%%%%%%%%%
% First node %
%%%%%%%%%%%%%%
\node [minimum size=0.3cm,inner sep=0pt,circle,fill=blue,pin={[pin distance=1cm]0: First point}] at (axis cs:0,0) {};
%%%%%%%%%%%%%%%
% second node %
%%%%%%%%%%%%%%%
\node [minimum size=0.3cm,inner sep=0pt,circle,fill=blue] at (axis cs:2.45,35.72) {};
%%%%%%%%%%%%%%
% Third node %
%%%%%%%%%%%%%%
\node [minimum size=0.3cm,inner sep=0pt,circle,fill=blue,pin={[pin distance=1cm]-15: Third point}] at (axis cs:4.09,79.74) {};
%%%%%%%%%%%%%%%
% Fourth node %
%%%%%%%%%%%%%%%
\node [minimum size=0.3cm,inner sep=0pt,circle,fill=blue,pin={[pin distance=1cm]-15: End of linear behaviour}] at (axis cs:5.49,108.58) {};
%%%%%%%%%%%%%
% Last node %
%%%%%%%%%%%%%
\node [minimum size=0.3cm,inner sep=0pt,circle,fill=blue,pin={[pin distance=1cm]200: Failure}] at (axis cs:70.77,134.77) {};
\end{axis}
\end{tikzpicture}
\end{center}
\end{document}

ここに画像の説明を入力してください

関連情報