pgfplots에서 로그 스케일을 사용할 때 관점을 변경하는 방법은 무엇입니까?

pgfplots에서 로그 스케일을 사용할 때 관점을 변경하는 방법은 무엇입니까?

3개의 점이 있는 표면을 표시하고 싶습니다. 나는 두 개의 게시물을 결합하려고 시도했지만 부분적인 성공을 거두었습니다. 관점을 바꾸면 위의 그림이 나옵니다. 이 경우 로그 스케일링은 사라지지만 내가 원했던 것과 가깝습니다(메시 포인트의 볼 제외). 시점을 변경하지 않으면 로그 스케일링은 완벽하지만 흥미로운 표면 단면과 점이 보이지 않는 하단 그림이 나타납니다. 로그 크기 조정을 유지하면서 관점을 어떻게 변경할 수 있습니까?

그런데: 이러한 점의 3D 위치가 서로 어떻게 관련되어 있는지 강조하는 가장 좋은 방법은 무엇입니까? 표면에 추가 메쉬 선이 있을 수도 있나요? 아니면 해당 좌표에 투영된 선이 있습니까?

여기에 이미지 설명을 입력하세요 여기에 이미지 설명을 입력하세요

\documentclass[border= 5mm]{standalone}
\usepackage{pgfplots}
%https://tex.stackexchange.com/questions/232070/3d-surface-plot-with-logarithmic-x-and-y-axis
%http://pgfplots.net/tikz/examples/mesh-plot/
\begin{document}

    \begin{tikzpicture}
    \begin{axis}
    [view={105}{18}] %% Comment this out
    [
    scale = 1,
    ymin = 1e5, xmax = 1.1e7,
    ymin = 1e-8, ymax = 1e-5,
    zmin = 0, zmax = 1,
        ztick={.2,.5,.8,1.0},
        ytick={1e-7,1e-6,1e-5},
colormap/jet,
    xmode=log, ymode=log
    ]

    \addplot3+[
    mesh,%scatter,%,samples=10
%   surf,
    samples=10,
    domain=5:7.1,
    domain y=-8:-5,
    ]
    (10^x, 10^y, {  1/(10^x*10^y+(1-10^y))});

\addlegendentry{Surface}
    \addplot3+[only marks] coordinates {
        (2397824, 1.665e-7, 0.715) };
\addlegendentry{A}
    \addplot3+[only marks] coordinates {
    (1572480, 2.09e-7, 0.753) };
\addlegendentry{B}
    \addplot3+[only marks] coordinates {
    (10649600,33e-9,.742) };
\addlegendentry{C}

    \end{axis}
    \end{tikzpicture}
\end{document}

답변1

기꺼이 이 문제를 제거하겠습니다. 축 옵션 을 닫았기 ]때문에 모든 로그 항목이 무시되었습니다. ][도착하려면 쉼표로 바꾸십시오 .

\documentclass[border= 5mm]{standalone}
\usepackage{pgfplots}
%https://tex.stackexchange.com/questions/232070/3d-surface-plot-with-logarithmic-x-and-y-axis
%http://pgfplots.net/tikz/examples/mesh-plot/
\begin{document}

    \begin{tikzpicture}
    \begin{axis}
    [view={105}{18}, %% Comment this out
    scale = 1,
    ymin = 1e5, xmax = 1.1e7,
    ymin = 1e-8, ymax = 1e-5,
    zmin = 0, zmax = 1,
        ztick={.2,.5,.8,1.0},
        ytick={1e-7,1e-6,1e-5},
colormap/jet,
    xmode=log, ymode=log
    ]

    \addplot3+[
    mesh,%scatter,%,samples=10
%   surf,
    samples=10,
    domain=5:7.1,
    domain y=-8:-5,
    ]
    (10^x, 10^y, {  1/(10^x*10^y+(1-10^y))});

\addlegendentry{Surface}
    \addplot3+[only marks] coordinates {
        (2397824, 1.665e-7, 0.715) };
\addlegendentry{A}
    \addplot3+[only marks] coordinates {
    (1572480, 2.09e-7, 0.753) };
\addlegendentry{B}
    \addplot3+[only marks] coordinates {
    (10649600,33e-9,.742) };
\addlegendentry{C}

    \end{axis}
    \end{tikzpicture}
\end{document}

여기에 이미지 설명을 입력하세요

위치를 나타내는 가장 좋은 방법이 무엇인지에 대해서는 잘 모르겠지만, 선과 바닥을 연결하는 얇은 선을 추가하고 표면을 마지막으로 그리는 것이 도움이 될 것이라고 생각합니다.

\documentclass[border= 5mm]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
%https://tex.stackexchange.com/questions/232070/3d-surface-plot-with-logarithmic-x-and-y-axis
%http://pgfplots.net/tikz/examples/mesh-plot/
\begin{document}

    \begin{tikzpicture}
    \begin{axis}
    [view={105}{18}, %% Comment this out
    scale = 1,
    ymin = 1e5, xmax = 1.1e7,
    ymin = 1e-8, ymax = 1e-5,
    zmin = 0, zmax = 1,
        ztick={.2,.5,.8,1.0},
        ytick={1e-7,1e-6,1e-5},
colormap/jet,
    xmode=log, ymode=log
    ]

    \addplot3+[only marks] coordinates {
        (2397824, 1.665e-7, 0.715) };
    \draw[thin,gray]    (2397824, 1.665e-7, 0.715) -- (2397824, 1.665e-7, 0);
\addlegendentry{A}
    \addplot3+[only marks] coordinates {
    (1572480, 2.09e-7, 0.753) };
    \draw[thin,gray] (1572480, 2.09e-7, 0.753)  -- (1572480, 2.09e-7, 0) ;
\addlegendentry{B}
    \addplot3+[only marks] coordinates {
    (10649600,33e-9,.742) };
    \draw[thin,gray] (10649600,33e-9,.742) -- (10649600,33e-9,0);
\addlegendentry{C}

    \addplot3+[
    mesh,%scatter,%,samples=10
%   surf,
    samples=10,
    domain=5:7.1,
    domain y=-8:-5,
    ]
    (10^x, 10^y, {  1/(10^x*10^y+(1-10^y))});

\addlegendentry{Surface}

    \end{axis}
    \end{tikzpicture}
\end{document}

여기에 이미지 설명을 입력하세요

관련 정보