Skip to content

Add map scales, compasses, and missing basemap features #36

@lukelbd

Description

@lukelbd

ProPlot should integrate with existing complex basemap features. For power users, this can be done by calling methods on ax.projection (which is the Basemap instance associated with the axes). But if we wanted to make things easier for users (in the spirit of ProPlot) we could add options to ProjectionAxes._format_apply as follows:

def _format_apply(
         ...
         etopo=None, bluemarble=None,
         mapscale=None, mapscale_kw=None,
         wmsimage=None, wmsimage_kw=None,
         warpimage=None, warpimage_kw=None,
         tissot=None, tissot_kw=None,
         patch_kw=None, **kwargs,
         ):
         """
         ...
         bluemarble : optional
             For basemap axes only. Draws the blue marble image.
         etopo : optional
             For basemap axes only. Draws topography data.
         mapscale, mapscale_kw : optional
             For basemap axes only. Draws a map scale.
         tissot, tissot_kw : optional
             For basemap axes only. Draws Tissot indicatrixes.
         warpimage, warpimage_kw : optional
             For basemap axes only. Adds arbitrary images to the background.
             See `~mpl_toolkits.basemap.Basemap.warpimage`.
         wmsimage, wmsimage_kw : optional
             For basemap axes only. Downloads and plots images using the WMS protocol.
             See `~mpl_toolkits.basemap.Basemap.warpimage`.
         ...
   """

Cartopy is missing several of these features, but distance scales could be implemented manually as discussed in this stackoverflow thread and this cartopy Github issue. This could be added to ProPlot ProjectionAxes, or to the cartopy project directly.

It would also be really interesting if we could add compasses to plots that show the Northward direction. This is not available in basemap or cartopy.

I'm not really motivated to address these proposals anytime soon but if someone else is, I think this is very doable for new contributors.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions