Plotting#

The satrain.plotting module provides visualization functions for SatRain data and results.

satrain.plotting#

Provides plotting-related functionality.

add_ticks(ax: Axes, lons: List[float], lats: list[float], left=True, bottom=True) None[source]#
download_blue_marble(texture_file: Path) Path[source]#

Download the texture file if it doesn’t exist.

Parameters:
  • url – String specifying the URL of the texture file.

  • texture_file – Path object pointing to the file to which to download the texture image.

get_blue_marble(area: pyresample.AreaDefinition) <module 'PIL.Image' from '/home/docs/checkouts/readthedocs.org/user_builds/satrain/envs/latest/lib/python3.12/site-packages/PIL/Image.py'>[source]#

Get NASA Blue Marble background image.

scale_bar(ax, length, location=(0.5, 0.05), linewidth=3, height=0.01, border=0.05, border_color='k', parts=4, zorder=50, textcolor='k')[source]#

Draw a scale bar on a cartopy map.

Parameters:
  • ax – The matplotlib.Axes object to draw the axes on.

  • length – The length of the scale bar in meters.

  • location – A tuple (h, w) defining the fractional horizontal position h and vertical position h in the given axes object.

  • linewidth – The width of the line.

set_style()[source]#

Set the SatRain matplotlib style.