I have two data frames with satellite data that I need to plot. The plot I've got so far looks like this:
However I want to get something like this :
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!
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()