![\addplot [중복]과 비교하여 이동된 노드의 \usetikzlibrary{plotmarks} 마커](https://rvso.com/image/316323/%5Caddplot%20%5B%EC%A4%91%EB%B3%B5%5D%EA%B3%BC%20%EB%B9%84%EA%B5%90%ED%95%98%EC%97%AC%20%EC%9D%B4%EB%8F%99%EB%90%9C%20%EB%85%B8%EB%93%9C%EC%9D%98%20%5Cusetikzlibrary%7Bplotmarks%7D%20%EB%A7%88%EC%BB%A4.png)
MWE:
\documentclass[]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.12}
\usetikzlibrary{plotmarks}
\begin{document}
\begin{tikzpicture}
\begin{axis}
\addplot[mark=*] coordinates
{(0,0)};
\node[blue] at (0,0) {\pgfuseplotmark{*}};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}
\addplot[mark=pentagon*] coordinates
{(0,0)};
\node[red] at (0,0) {\pgfuseplotmark{pentagon*}};
\end{axis}
\end{tikzpicture}
\end{document}
첫 번째 그림에서 볼 수 있듯이 두 마커는 모두 같은 위치에 있지만 두 번째 그림에서는 그렇지 않습니다. 로 표시된 것과 동일한 노드 내 마커 위치를 얻으려면 어떻게 해야 합니까 \addplot
?
업데이트: 로그 파일의 버전 번호:
Package: pgfplots 2015/05/02 v1.12.1 Data Visualization (1.12.1)
Package: pgf 2013/12/18 v3.0.0 (rcs-revision 1.14)
File: pgflibraryplotmarks.code.tex 2013/07/20 v3.0.0 (rcs-revision 1.13)
기타 질문(이것은 다소 중복됨):
- \pgfuseplotmark가 표시 왼쪽에 그렇게 많은 공간을 두는 이유는 무엇입니까?(가장 중요한 것은 이것을보십시오!)
- TikZ의 플롯마크는 x 방향으로 0.05만큼 벗어났습니다.
답변1
이는 PGF의 플롯 표시가 도면 지침 내부에서 사용되도록 준비되어 있기 때문입니다. 텍스트 모드에서 사용할 준비가 되어 있지 않습니다.
텍스트 모드에서 그리기 지침을 사용하려면 다음과 같이 그림으로 지침을 둘러싸야 합니다.
\documentclass[]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.12}
\usetikzlibrary{plotmarks}
\begin{document}
\begin{tikzpicture}
\begin{axis}
\addplot[mark=pentagon*] coordinates
{(0,0)};
\node[red] at (0,0) {\tikz \pgfextra{\pgfuseplotmark{pentagon*}};};
\end{axis}
\end{tikzpicture}
\end{document}