【发布时间】:2021-03-06 18:22:51
【问题描述】:
我正在尝试创建类似于这些图的内容:
我有表面图,现在我想在它下面分别绘制:
我尝试在曲面图中将 2D 图像绘制为二进制图,但每个像素在坐标系中被解释为一个整体单元,这是不正确的,它最终会复制坐标轴和绘图标题,同样,gnuplot 的 xyplane 不一定位于 z=0,因此仅使用 splot 通常使用 z 值为 0 进行绘图也不符合我的要求。
这些是我目前的绘图文件:
二维散点图:
set terminal png enhanced size 8000, 4800 truecolor font "arial,60"
set encoding utf8
set output outfile
set autoscale fix
set border lw 3
set style fill transparent solid 0.075 noborder
set style circle radius 0.03
set title plotTitle
plot sample1 u 1:2 w circles notitle,\
sample2 u 1:2 w circles notitle,\
$ContourTable w lines lw 6 lc rgb 'black' notitle,\
keyentry w circles fill solid 1.0 noborder lc 1 title "ω_1",\
keyentry w circles fill solid 1.0 noborder lc 2 title "ω_2"
曲面图:
set terminal png enhanced size 8000, 4800 truecolor font "arial,60"
set encoding utf8
set output outfile
set autoscale fix
set border lw 3
set title plotTitle
set isosamples 100
set pm3d at s explicit hidden3d
unset hidden3d
set palette model RGB define (1 "dark-violet", 2 "#009e73")
splot pdfFile u 1:2:3:4 w pm3d lc rgb "black"
【问题讨论】:
-
我很困惑。您从哪里获得表面数据,即
pdfFile是什么?这些数据看起来如何?这是二维散点数据的密度图吗?能举个例子吗? -
@theozh 是的。表面图是从散点图中提取样本的联合密度图 - 我是从 C++ 程序生成的。表面根据在该点哪个类的边际密度较大而着色。这是
pdfFile的示例:pastebin.com/XMhBLeW5。