Documentation Index
Fetch the complete documentation index at: https://mintlify.com/NASAARSET/PM2.5_AQ_Online_2026/llms.txt
Use this file to discover all available pages before exploring further.
F_plot_map is the primary visualisation utility in the ARSET PM2.5 workflow.
It can render gridded satellite or model data (passed as an xarray
object), point observations from ground monitors (passed as a pandas
DataFrame), or both simultaneously on a single geographic map. The function
wraps cartopy and matplotlib to draw coastlines, lakes, political borders,
state boundaries, and latitude/longitude gridlines automatically, so you can
produce publication-ready maps with a single call.
Use F_plot_map after loading data with F_subset_and_combine or
F_get_OpenAQ_from_API to inspect spatial patterns, identify outliers, or
overlay satellite estimates on top of ground-monitor observations. Multiple
calls sharing the same o_figure, o_axis, and o_plot objects can build up
layered maps incrementally.
Parameters
Gridded data to render as a filled colour mesh (pcolormesh). Typically one
time-slice of the
xarray.Dataset returned by F_subset_and_combine,
e.g. a_data['SatPM'].sel(time='2023-06'). Pass None to skip the
gridded layer.Point data to render as coloured scatter markers. The DataFrame must have a
MultiIndex whose first two levels are
lat and lon. Typically the output
of F_get_OpenAQ_from_API or F_get_SINCA_from_web, aggregated to a
single value per location. Pass None to skip the point layer.Southern boundary of the map extent, in decimal degrees.
Northern boundary of the map extent, in decimal degrees.
Western boundary of the map extent, in decimal degrees.
Eastern boundary of the map extent, in decimal degrees.
Matplotlib colormap used for both the gridded mesh and the scatter markers.
Any named Matplotlib colormap is accepted:
Label text placed beside the colour bar. Typically the variable name and
units, e.g.
'PM₂.₅ (µg/m³)'.Title string displayed above the map axes.
Two-element list
[vmin, vmax] controlling the range of the colour scale.
Data values below vmin or above vmax are clipped to the colour bar
extremes. For PM2.5 in µg/m³, typical values are [0, 50] for annual
mean maps and [0, 150] for daily or event maps.Marker size (in Matplotlib
s units, i.e., points²) for the scatter plot
drawn from a_data_plot_point. Increase for sparse monitor networks;
decrease for dense urban networks where markers overlap.Angular spacing (in degrees) between the latitude and longitude gridlines
drawn on the map. Use
0.5 for city-scale maps and 5 or 10 for
continental or global views.An existing Matplotlib
Figure object to draw into. If None, a new figure
is created internally. Pass the object returned by a previous call to build
multi-panel figures.An existing Cartopy
GeoAxes object to draw into. If None, a new axis is
created. Must be paired with a matching o_figure.The plot artist returned by a previous call, used for consistent colour
scale when layering multiple calls. Pass
None on the first call.If
True, plt.show() is called at the end of the function, rendering the
figure inline in a Jupyter notebook. Set to False when combining multiple
layers or saving to file programmatically.If
True, the following Natural Earth features are overlaid on the map
using cartopy.feature: coastlines, lakes, country borders,
and state/province boundaries. Set to False for a plain data-only
plot or when working offline without the Natural Earth data files.Return Values
The Matplotlib
Figure object used for the plot. Pass back into subsequent
calls to overlay additional layers on the same canvas.The Cartopy
GeoAxes object used for the plot. Pass back into subsequent
calls to reuse the same map projection and extent.The plot artist (e.g.,
QuadMesh for gridded data or PathCollection for
scatter). Useful for constructing a shared colour bar when layering plots.Usage Examples
Plot gridded satellite PM2.5
Overlay ground monitor observations on gridded data
Save to file without displaying
Both
a_data_plot and a_data_plot_point can be passed together to render
gridded and point data simultaneously in a single call. The same colour scale
(Colorbar_Limits and my_cmap) is applied to both layers, so make sure
the data ranges are comparable.b_shapefiles=True (the default) requires the cartopy package and its
Natural Earth data to be installed. In restricted compute environments
without internet access, pre-download the Natural Earth shapefiles or set
b_shapefiles=False to skip coastline, lake, border, and state boundary
rendering.Related
F_subset_and_combine— produce thexarraygridded data consumed bya_data_plot.F_get_OpenAQ_from_API— produce the point DataFrame consumed bya_data_plot_point.F_get_SINCA_from_web— alternative source of point observations fora_data_plot_point.- Visualization Guide — recommended colour scales, map extents, and figure export settings for the case-study notebooks.
