绘制卫星数据

发布于 2025-01-25 20:06:16 字数 694 浏览 2 评论 0原文

我有两个数据帧,其中包含我需要绘制的卫星数据。到目前为止,我已经有这样的情节:

这意味着我需要所有数据点与经度和纬度相对于经度和纬度具有现实的大小。 CloudSat数据点大小为1.4公里,沿轨道为1.7。 AMSRE数据点在轨道上为4公里,沿轨道为6公里。 我用来绘制数据的代码:

plt.rcParams["figure.figsize"] = (15,15)

ax = cloudsat.plot(kind='scatter', x='Longitude', y='Latitude', color='DarkBlue', label='Cloudsat')

amsre.plot(kind='scatter', x='Longitude', y='Latitude', color='DarkGreen', label='Amsre', ax=ax)

谢谢!

I have two data frames with satellite data that I need to plot. The plot I've got so far looks like this: enter image description here

However I want to get something like this :
enter image description here

Meaning that I need all data points to have a realistic size relative to longitude and latitude.
CloudSat datapoint size is 1.4 km across track, and 1.7 along track. Amsre datapoint is 4 km across track, and 6 km along track.
The code I use to plot data:

plt.rcParams["figure.figsize"] = (15,15)

ax = cloudsat.plot(kind='scatter', x='Longitude', y='Latitude', color='DarkBlue', label='Cloudsat')

amsre.plot(kind='scatter', x='Longitude', y='Latitude', color='DarkGreen', label='Amsre', ax=ax)

Thanks!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

温暖的光 2025-02-01 20:06:16

由于您尚未共享数据范围,因此我在此处使用一个示例。

import pandas as pd
import matplotlib.pyplot as plt


cloudsat = pd.DataFrame({
    'Longitude': [10, 20, 30],
    'Latitude': [10, 20, 30]
})

amsre = pd.DataFrame({
    'Longitude': [15, 25, 35],
    'Latitude': [15, 25, 35]
})

plt.rcParams["figure.figsize"] = (15, 15)

cloudsat_size = (1.4 * 1000)  # Convert km to meters
amsre_size = (4 * 1000)        # Convert km to meters

plt.scatter(cloudsat['Longitude'], cloudsat['Latitude'], 
            color='DarkBlue', label='CloudSat', 
            s=cloudsat_size, alpha=0.5)

plt.scatter(amsre['Longitude'], amsre['Latitude'], 
            color='DarkGreen', label='AMSR-E', 
            s=amsre_size, alpha=0.5)

plt.xlabel('Longitude')
plt.ylabel('Latitude')
plt.title('Satellite Data Points')
plt.legend()
plt.grid()

# codeto show the plot
plt.show()

Since you have not shared the dataframes, I am using an example here.

import pandas as pd
import matplotlib.pyplot as plt


cloudsat = pd.DataFrame({
    'Longitude': [10, 20, 30],
    'Latitude': [10, 20, 30]
})

amsre = pd.DataFrame({
    'Longitude': [15, 25, 35],
    'Latitude': [15, 25, 35]
})

plt.rcParams["figure.figsize"] = (15, 15)

cloudsat_size = (1.4 * 1000)  # Convert km to meters
amsre_size = (4 * 1000)        # Convert km to meters

plt.scatter(cloudsat['Longitude'], cloudsat['Latitude'], 
            color='DarkBlue', label='CloudSat', 
            s=cloudsat_size, alpha=0.5)

plt.scatter(amsre['Longitude'], amsre['Latitude'], 
            color='DarkGreen', label='AMSR-E', 
            s=amsre_size, alpha=0.5)

plt.xlabel('Longitude')
plt.ylabel('Latitude')
plt.title('Satellite Data Points')
plt.legend()
plt.grid()

# codeto show the plot
plt.show()
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文