在同一3D图形上根据散点和png绘制3D曲面

编程入门 行业动态 更新时间:2024-10-26 06:32:30
本文介绍了在同一3D图形上根据散点和png绘制3D曲面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我需要在同一张图上绘制基于散点数据和2D图像(.png)的3D表面,该2D图像位于图上确定的位置,以比较两者的数据.到目前为止,我设法分别完成了这两项工作(绘制图像并制作表面).

I need to plot on the same graph a 3D surface based on a scatter points data and a 2D image (.png), positioned in a determined location on the graph to compare the data from both. So far I managed to do both separately (plotting the image and making the surface).

但是,当我尝试将两个脚本放到同一脚本上时,我收到一条错误消息(未实现颜色列的网格化"),该错误消息是由于创建与该表面冲突的命令(dgrid3d)而发生的图片.我想知道如何避免此错误.

However, when I try to bring both together on the same script, I get an error message ("Gridding of the color Column is not implemented") which occurs due to the command that creates the surface (dgrid3d) that conflicts with the image. I want to know how can I avoid this error.

预先感谢

*编辑

分散点采用xyz格式:

The scatter points are on xyz format:

-100.000000 -25.000000 -4.122210 -100.000000 -20.000000 -4.933388 -100.000000 -15.000000 -7.902138 -100.000000 -10.000000 -7.902138

图片是普通的png.

我正在使用的脚本是:

set hidden3d set samples 100 set isosamples 100 unset surface set pm3d set dgrid3d splot '444_0.dat' u 1:2:3 \ splot 'test.png' \ binary filetype=png flipy rotate=-90d center = (4,-25,5.7) perp=(0,1,0) with rgbimage

由于我之前指出的错误而无法正常工作

which doesnt work due to the error I pointed before

推荐答案

错误消息表明问题出在dgrid3d.您可能能够解决的一种方法是将表面绘制到桌子上:

The error message suggests that the problem is with dgrid3d. One way that you might be able to get around that is to plot the surface to a table:

set terminal push #Save current terminal settings set terminal unknown #dummy terminal set table "surface.dat" set dgrid3d splot 'surface_points.dat' using ... unset dgrid3d unset table set term pop #reset current terminal settings set output "MyPlot.extension" #commands to plot image and `surface.dat` together.

更多推荐

在同一3D图形上根据散点和png绘制3D曲面

本文发布于:2023-07-17 17:08:25,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1135382.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:曲面   图形   在同一   png

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!