![]() Currently an image "factory" is just an object with a ``image_for_domain`` method. The advantage of this approach is that the limits of the map do not need to be known when adding the image factory, but can be deferred until everything which can effect the limits has been added. Any image "factory" added, will be asked to retrieve an image with associated metadata for a given bounding box at draw time. def add_image ( self, factory, * args, ** kwargs ): """ Adds an image "factory" to the Axes. pop ( 'map_projection' ) super ( GeoAxes, self ). All other args and keywords are passed through to :class:``. Kwargs: * map_projection - The target :class:`~` of this Axes object. pyplot.axes(projection=()) ntourf(x, y, data, transform=()) """ def _init_ ( self, * args, ** kwargs ): """ Create a GeoAxes object using standard matplotlib :class:`~` args and kwargs. For example:: # Plot latlon data on an OSGB map. geo_axes = pyplot.subplot(2, 2, 1, projection=()) When a source projection is provided to one of it's plotting methods, using the *transform* keyword, the standard matplotlib plot result is transformed from source coordinates to the target projection. ![]() geo_axes = pyplot.axes(projection=()) # Set up an OSGB map. For example:: # Set up a standard map for latlon data. This class replaces the matplotlib :class:`~` class when created with the *projection* keyword. Axes ): """ A subclass of :class:`` which represents a map :class:`~`. """ return InterProjectionTransform ( self. WeakKeyDictionary () """ A nested mapping from path, source CRS, and target projection to the resulting transformed paths:: else : mapping = result return result def inverted ( self ): """ Return a matplotlib :class:`~` from target to source coordinates. _version_ >= '1.2', ( 'Cartopy can only work with ' 'matplotlib 1.2 or greater.' ) _PATH_TRANSFORM_CACHE = weakref. ![]() """ import warnings import weakref import matplotlib import matplotlib.axes import llections as mcollections from matplotlib.image import imread import ansforms as mtransforms import matplotlib.patches as mpatches import matplotlib.path as mpath import numpy import shapely.geometry from cartopy import config import cartopy.crs as ccrs import cartopy.feature import cartopy.img_transform import _artist as feature_artist import as patch assert matplotlib. When a matplotlib figure contains a GeoAxes the plotting commands can transform plot results from source coordinates to the GeoAxes' target projection. """ This module defines the :class:`GeoAxes` class, for use with matplotlib. # You should have received a copy of the GNU Lesser General Public License # along with cartopy. See the # GNU Lesser General Public License for more details. # cartopy is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # cartopy is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the # Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # (C) British Crown Copyright 2011 - 2013, Met Office # This file is part of cartopy.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |