pgfplots에서 3D 플롯에 대한 데이터를 추정하는 것이 가능합니까?

pgfplots에서 3D 플롯에 대한 데이터를 추정하는 것이 가능합니까?

플롯할 여러 측정이 있는데 의 3D 표면과 같은 것을 사용하고 싶습니다 pgfplots. 외부 테두리로 프레임을 사용하고 측정 래스터로 그리드를 사용하고 있습니다. 측정된 값은 각 그리드 셀의 중앙에서 가져옵니다. 전체 표면을 플롯할 때 전체 표면을 채우기 위해 프레임 외부 경계까지 데이터를 추정하고 싶습니다.

지금까지 내가 가진 것은 다음과 같습니다.

\documentclass{standalone}
\usepackage[locale = DE]{siunitx}
\usepackage{pgfplots}
\pgfplotsset{compat=1.10}
\SendSettingsToPgf
\pgfplotsset{%
    ,grid style={black, thin}
    ,y label style={rotate=-90}
}

\begin{document}
\begin{tikzpicture}
    \begin{axis}[%
            ,colorbar
            ,view={0}{90}
            ,xmin=0
            ,xmax=3910
            ,ymin=0
            ,ymax=2040
            ,width=391pt
            ,height=204pt
            ,grid=major
            ,xlabel=Width $b_\mathrm{frame}$ in \si{\milli\metre}
            ,ylabel=Height $h_\mathrm{frame}$ in \si{\milli\metre}
        ]
        \addplot3[%
            ,surf
            ,shader=interp
        ] file {data.dat};
    \end{axis}
\end{tikzpicture}
\end{document}

다음 과 data.dat같습니다:

85  1955    0.97
255 1955    1.86
425 1955    2.44
595 1955    2.23
765 1955    2.17
935 1955    2.35
1105    1955    2.21
1275    1955    2.53
1445    1955    2.58
1615    1955    2.64
1785    1955    2.6
1955    1955    2.03
2125    1955    2.5
2295    1955    2.32
2465    1955    2.22
2635    1955    2
2805    1955    1.59
2975    1955    2.23
3145    1955    2.18
3315    1955    2.07
3485    1955    2.38
3655    1955    2.48
3825    1955    1.42

85  1785    1.3
255 1785    1.41
...

x = 0그래서 나는 모든 것과 포인트에 대한 가치를 얻어야합니다 y = 0. 보간할 수 있는 것처럼 pgfplots추정할 수도 있습니다.

그 모습은 다음과 같습니다.

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

두 가지 추가 포인트:

  • 측정 래스터에 그리드(틱이 아님)를 가져오고 싶습니다(예: 각 170mm).
  • 나는 컬러맵에 라벨을 붙이고 싶습니다.speed $v$ in \si{\metre\per\second}

답변1

주요 질문에 관해서 :

pgfplots외삽에 대한 기본 지원은 제공되지 않습니다.

octave또는 외부 제품을 사용하여 계산해야 합니다 matlab.

답변2

(일부 해결) 해당 기능에 대해서는 잘 모르겠습니다. 죄송합니다. 하지만 제가 그 두 가지 추가 작업을 도와드릴 수 있습니다. 여기 있습니다.

\documentclass{standalone}
\usepackage{filecontents}
\usepackage[locale = DE]{siunitx}
\usepackage{pgfplots}
\pgfplotsset{compat=1.10}
\SendSettingsToPgf
\pgfplotsset{%
    ,grid style={black, thin}
    ,y label style={rotate=-90}}
\begin{document}
\begin{filecontents*}{data.dat}
85  1955    0.97
255 1955    1.86
425 1955    2.44
595 1955    2.23
765 1955    2.17
935 1955    2.35
1105    1955    2.21
1275    1955    2.53
1445    1955    2.58
1615    1955    2.64
1785    1955    2.6
1955    1955    2.03
2125    1955    2.5
2295    1955    2.32
2465    1955    2.22
2635    1955    2
2805    1955    1.59
2975    1955    2.23
3145    1955    2.18
3315    1955    2.07
3485    1955    2.38
3655    1955    2.48
3825    1955    1.42
85  1785    1.3
255 1785    1.41 
\end{filecontents*}
\begin{tikzpicture}
    \begin{axis}[%
            ,colorbar
            ,view={0}{90}
            ,xmin=0
            ,xmax=3910
            ,ymin=0
            ,ymax=2040
            ,width=391pt
            ,height=204pt
            ,grid=major
            ,xlabel=Width $b_\mathrm{frame}$ in \si{\milli\metre}
            ,ylabel=Height $h_\mathrm{frame}$ in \si{\milli\metre}
,xtick={0,170,...,3910}
,ytick={0,170,...,2040}
,tick style={black}
,x tick label style={rotate=90}
        ]
        \addplot3[
            ,surf, 
            ,shader=interp
        ] file {data.dat};
    \end{axis}
\node[xshift=2mm, yshift=4.5mm, rotate=90] at (current bounding box.east){Speed $v$ in \si{\metre\per\second}};
\end{tikzpicture}
\end{document}

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

편집하다:그리드가 레이블보다 더 자주 나타나는 효과를 얻기 위해 메이저 및 마이너 틱을 사용하여 예제를 확장할 수 있습니다. z축의 최소값과 최대값을 제어하기 위해 두 개의 빈 점이 있는 또 다른 3D 플롯을 추가했는데 이는 컬러맵에 영향을 미칩니다.

\documentclass{standalone}
\usepackage{filecontents}
\usepackage[locale = DE]{siunitx}
\usepackage{pgfplots}
\pgfplotsset{compat=1.10}
\SendSettingsToPgf
\pgfplotsset{%
    ,grid style={black, thin}
    ,y label style={rotate=-90}}
\begin{document}
\begin{filecontents*}{data.dat}
85  1955    0.97
255 1955    1.86
425 1955    2.44
595 1955    2.23
765 1955    2.17
935 1955    2.35
1105    1955    2.21
1275    1955    2.53
1445    1955    2.58
1615    1955    2.64
1785    1955    2.6
1955    1955    2.03
2125    1955    2.5
2295    1955    2.32
2465    1955    2.22
2635    1955    2
2805    1955    1.59
2975    1955    2.23
3145    1955    2.18
3315    1955    2.07
3485    1955    2.38
3655    1955    2.48
3825    1955    1.42
85  1785    1.3
255 1785    1.41 
\end{filecontents*}
\begin{tikzpicture}
    \begin{axis}[%
            ,colorbar
            ,view={0}{90}
            ,xmin=0
            ,xmax=3910
            ,ymin=0
            ,ymax=2040
            ,width=391pt
            ,height=204pt
            ,grid=minor
            ,xlabel=Width $b_\mathrm{frame}$ in \si{\milli\metre}
            ,ylabel=Height $h_\mathrm{frame}$ in \si{\milli\metre}
,minor xtick={0,170,...,5000}
,minor ytick={0,170,...,5000}
,xtick={0,500,...,5000}
,ytick={0,500,...,5000}
,tick style={black}
%,x tick label style={rotate=90}
        ]
\addplot3[surf, shader=interp] file {data.dat};
\addplot3[surf] coordinates {(0, 0, 0) (0, 0, 3)};
    \end{axis}
\node[xshift=2mm, yshift=4.5mm, rotate=90] at (current bounding box.east){Speed $v$ in \si{\metre\per\second}};
\end{tikzpicture}
\end{document}

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

관련 정보