python等值线如何设置高度的范围和间隔 您所在的位置:网站首页 等高线取值范围 python等值线如何设置高度的范围和间隔

python等值线如何设置高度的范围和间隔

2024-01-20 02:14| 来源: 网络整理| 查看: 265

I have trouble with matplotlib / pyplot / basemap. I plot contour lines (air pressure) on a map. I use clabel to show the value of the contour lines.

But the problem is: the padding between the value and the contour line is too much. I have found the parameter "inline_spacing", which i have set to zero. But there is still to much free space. Any ideas?

Python Code:

import matplotlib

matplotlib.use('Agg')

import matplotlib.pyplot as plt

from mpl_toolkits.basemap import Basemap

import pygrib

filename = "file.grib2"

grbs = pygrib.open('/data/' + filename)

grb = grbs[2]

data = grb.values

datac = data*0.01

lats, lons = grb.latlons()

fig = plt.figure()

m = Basemap(pro



【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有