尝试使用与 Windows 上的 gnuplot 相同的脚本在 Mac 上绘制轮廓
我在 Mac 上使用 gnuplot 时遇到问题。在 Windows 上,一切看起来都很好,我可以轻松地在“热图”上绘制轮廓。但在我的 Mac 上,使用相同的脚本,我可以绘制地图,但不能绘制其顶部的轮廓。
https://i.sstatic.net/70j58.jpg 这是两张图片。一张带有轮廓的在 Windows 上,另一张在 Mac 上。
https://justpaste.it/6ws4h 这是脚本。
我尝试了 grid3d,但它们似乎不像我在 Windows 上绘制的那样准确。
I have an issue with gnuplot on Mac. On windows everything seems fine I can easily draw contours on a "heat map". But on my Mac using the same script I can plot the map but not the contours on top of it.
https://i.sstatic.net/70j58.jpg here is the two images. One with the contours is on Windows, other one is on Mac.
https://justpaste.it/6ws4h and here is the script.
I tried grid3d but they seem like not nearly accurate as the ones I have plotted on windows.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我无法解释你的两台机器之间的区别,但我想我可以看到问题出现在哪里。脚本中的以下几行与生成显示曲面和轮廓的绘图不一致:
问题是默认样式和显式绘图命令都指定
pm3d
,它是一个填充区域曲面阴谋。但轮廓需要用线或标签来绘制。您需要默认值和显式样式的某种组合,以允许您混合曲面和线条。我认为其中任何一个都可以解决问题:或者
I cannot explain the difference between your two machines, but I think I can see where the problem arises. The following lines from your script are inconsistent with producing a plot with both a surface and contours shown:
The issue is that both the default style and the explicit plot command specify
pm3d
, which is a filled-area surface plot. But contours need to be drawnwith lines
orwith labels
. You need some combination of defaults and explicit styles that allows you to mix both a surface and lines. I think either of these would do the trick:or
出色地!我会回答我自己的问题。
解决了我的问题。!
Well! I will answer my own question.
Solved my problem.!