绘制(轮廓图,视图图)并在同一图形上绘制 [英] Splot (contour, view map) and plot on same graph

查看:48
本文介绍了绘制(轮廓图,视图图)并在同一图形上绘制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试绘制两个叠加图.

I am trying to plot two overlaying graphs.

第一个是简单的x-y点图:

The first is a simple x-y points plot:

plot myfile u 1:2

第二个是0级的等高线图,我可以用 以下命令:

The second is a contour plot at level 0, which I can plot with the following commands:

set contour
unset surface
set view map
set cntrparam levels discrete 0
splot a0 + a1*x + a2*y + a3*x**2 + a4*x*y + a5*y**2 + a6*x**3 + a7*x**2*y + a8*x*y**2 + a9*y**3

a0-a9是常量

两者都使用相同的xrange和yrange.

Both use the same xrange and yrange.

如何将它们都绘制在同一张图中?

How can I plot them both in the same graph?

推荐答案

这有些棘手.您可以使用

This is a somewhat tricky one. You can write the contours to a file using

未经测试的

set table 'datafile'
set contour
#contour options
splot ... with contours
unset table

然后您可以用线绘制该数据:

Then you can plot that data with lines:

set term ...
set output ...
set view map
splot myfile u 1:2:(0.0), 'datafile'  u 1:2:3 w lines

这篇关于绘制(轮廓图,视图图)并在同一图形上绘制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆