如何生成等高线图? [英] How do I generate a contour graph?

查看:35
本文介绍了如何生成等高线图?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何生成这样的等高线图:轮廓 http://www.fz-juelich.de/vislab/software/gsharp/Gsharp/userguide/interpolate/ex6.gif

How do I generate a contour graph like this: contour http://www.fz-juelich.de/vislab/software/gsharp/Gsharp/userguide/interpolate/ex6.gif

如果点在规则网格上就很容易了,但如果不是,就像我的例子一样?是否有一个相当简单的算法来确定每个像素的颜色?

It's easy enough if the points are on a regular grid, but what if they aren't, like in my example? Is there a fairly simple algorithm to determine the color for each pixel?

推荐答案

也许有点晚了,

但是在较新版本的 matplotlib 中,您可以对数据进行网格化:

however in the newer versions of matplotlib you can grid data:

http://www.scipy.org/Cookbook/Matplotlib/Gridding_irregularly_spaced_data

也许有帮助

这篇关于如何生成等高线图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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