3Dプロットでは
3番目の凡例エントリを変更して、線ではなくマークのみを表示するようにします。
https://tex.stackexchange.com/a/113765/28093
\addlegendimage{only marks}
3 番目のエントリには のようなものを使用すべきだと理解しました。ただし、 は\addlegendimage{...}
プロットの順序 ( なしforget plot
) にする必要があるため、2 つのサーフェスに対して で何を使用するかを知る必要があります\addlegendimage{...}
。適切な 3D メッシュ凡例エントリを取得するためにどの引数を使用すればよいかわかりません。pgfplots
コマンド のドキュメントのマニュアルで見つけることができません\addlegendimage{...}
。
only marks
さらに、凡例エントリの色やタイプを変更せずに、変更のみを希望する場合、\addplot
コマンドで使用されている色とタイプを取得するにはどのコマンドを使用しますか?
最小限の動作例:
\documentclass{standalone}
\usepackage{pgfplots}
\begin{document}
\begin{tikzpicture}
\begin{axis}
[
xmin=0,xmax=1,xtick={0,1},xlabel=$x$,ymin=0,ymax=1,ytick={0,1},ylabel=$y$,zmin=0,zmax=1,ztick={0,1},legend style={at={(1,1)},anchor=north west,draw=none,fill=none},legend cell align=left,view={45}{10}
]
% What should I put here?
%\addlegendimage{???};
%\addlegendimage{???};
%\addlegendimage{???};
% phi
\addplot3[mesh,blue,domain=0:1,domain y=1/2:1,samples=5] {0};\addlegendentry{plot 1};
\addplot3[mesh,blue,domain=0:1/2,domain y=0:1/2,samples=5,forget plot] {(x-0)*(y-1/2)/((1/2-0)*(0-1/2))};
\addplot3[mesh,blue,domain=1/2:1,domain y=0:1/2,samples=5,forget plot] {(x-1)*(y-1/2)/((1/2-1)*(0-1/2))};
% phi*2*sin(2*pi*x)
\addplot3[mesh,red,domain=0:1,domain y=1/2:1,samples=5] {0};\addlegendentry{plot 2};
\addplot3[mesh,red,domain=0:1/2,domain y=0:1/2,samples=5,forget plot] {(x-0)*(y-1/2)/((1/2-0)*(0-1/2))*0.6*(sin(deg(2*pi*x))+1)};
\addplot3[mesh,red,domain=1/2:1,domain y=0:1/2,samples=5,forget plot] {(x-1)*(y-1/2)/((1/2-1)*(0-1/2))*0.6*(sin(deg(2*pi*x))+1)};
\addplot3[draw=none,black,mark=o] coordinates { (0,0,0)
(1/2,0,0)
(1,0,0)
(1,1/2,0)
(1,1,0)
(1/2,1,0)
(0,1,0)
(0,1/2,0)};\addlegendentry{plot 3};
\end{axis}
\end{tikzpicture}
\end{document}