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 = 0pgfplots補間が可能なので、おそらく、外挿も可能でしょう。

それは次のようになります:

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

追加ポイントが2つあります:

  • 測定ラスターにグリッド(目盛りではなく)を表示したいのですが、たとえば170 mmごとに
  • カラーマップにラベルを付けたいのですがspeed $v$ in \si{\metre\per\second}

答え1

主な質問に関して:

pgfplots外挿の組み込みサポートはありません。

octaveこれらは、おそらくまたは などの外積を使用して計算する必要がありますmatlab

答え2

(部分的な解決策) 申し訳ありませんが、そのような機能については知りません。ただし、これら 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 軸の最小値と最大値を制御するために、2 つの空白ポイントを持つ別の 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}

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

関連情報