Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Basic OmF/OmA Maps #108

Merged
merged 8 commits into from
Nov 18, 2021
6 changes: 3 additions & 3 deletions LAMDA/map_departures.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def _create_map_departures(df, domain, projection,
omfscatter = MapScatter(latitude=lats,
longitude=lons,
data=omf)
omfscatter.markersize = 1
omfscatter.markersize = 2
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possible to add the following kwarg? omfscatter.linewidths=0.15. I don't know API from which MapScatter is derived, but assuming it's from matplotlib and is based upon matplotlib.pyplot.scatter that should help the markers show up a little bit better. If it doesn't work right we made need to change the edgecolor kwarg.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is something we will have to add to EMCPy, as I don't think all **kwargs are inherited. We probably have to add it, what do you think @kevindougherty-noaa ?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I was just about to comment on this. Taking a look at MapScatter, I think it would be just as simple as adding self.linewidths as an additional argument.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this needs even more work in EMCPy, as I don't think the edge colors argument is passed properly, see NOAA-EMC/emcpy#80

omfscatter.cmap = 'coolwarm'
# determine min/max of values
maxval = np.nanmax(omf)
Expand All @@ -62,8 +62,8 @@ def _create_map_departures(df, domain, projection,
# add stats to figure
stats_dict = {
'nobs': len(lats),
'min': minval,
'max': maxval,
'min': np.round(minval, 4),
'max': np.round(maxval, 4),
}
mymap.add_stats_dict(stats_dict=stats_dict)
# save figure
Expand Down