7列80万行以上の散在データファイル(データファイル)があります。このデータの等高線をプロットしたいと思います。プロットしたい列は、最初の列、2番目の列、最後の(7番目の)列で、次のように2次元と3次元のプロットを示します。
正面図:
エッジビュー:
そしてシンプルな3D:
As one can see from the second plot, the first thing is that the points are clustered in a particular location of the 2d region, the same region in which there is the minimum, that can be seen in the 3d plot. But, second, these points are randomly distributed in the plane (second figure) and I guess I cannot use a matrix representation to draw the contours of iso-z.
Is it possible to use gnuplot set contour base
and cntrparam levels
to do that?
You need some smoothing (or interpolation algorithm). The set dgrid3d
option helps you create a regular grid and interpolate the values from your scattered data set. There are different ways to interpolate the data, for which you can check help set dgrid3d
for more info. I have used a Gaussian smearing for which your data looks good:
set dgrid3d 50,50 gauss 10e-6,10e-6
set logscale z
splot "fort.12" u 1:2:7 w l
gnuplotは新しい50x50グリッドを生成するのに時間がかかることに注意してください(グリッドポイントの数を増やすと、それに応じて計算時間が長くなります)、低解像度でテストを行い、非常に細かい詳細が必要な場合は、より細かいグリッドを使用できます「プロダクションフィギュア」のために。ガウスカーネルで距離スケーリングを試してグラフの外観を変更することはできますが、データセットの場合、上記の例よりもはるかに小さくすると、表面にノイズが発生し始めます。
これで、上記のデータ処理で等高線を使用できます。
set view map
unset surface
set contour
splot "fort.12" u 1:2:7 w l
最後に、補間されたデータを再利用する場合set dgrid3d ...; set table "somefile"; plot ...; unset table; unset dgrid3d; plot "somefile" ...
は、gnuplotが毎回補間を行う必要がないように、データをテーブルにプロットする(つまり、ファイルにプロットする)ことができることに注意してください。
この記事はインターネットから収集されたものであり、転載の際にはソースを示してください。
侵害の場合は、連絡してください[email protected]
コメントを追加