Are you over 18 and want to see adult content?
More Annotations
WARMAZON® | Black Market Amazon Kindle, Audible & TiDAL
Are you over 18 and want to see adult content?
The Garden Inspirations | Unique Garden Inspirations For Free
Are you over 18 and want to see adult content?
ADrive | Online Storage, Online Backup, Cloud Storage
Are you over 18 and want to see adult content?
Find Your Dream Career | LearnHowToBecome.org
Are you over 18 and want to see adult content?
Tanie Loty - Wyszukiwarka lotów, bilety lotnicze
Are you over 18 and want to see adult content?
Jobs projets europeens | Offres d'emploi et de stage dans le domaine des projets européens
Are you over 18 and want to see adult content?
Tag der offenen Töpferei
Are you over 18 and want to see adult content?
OpenProcessing - Creative Coding for the Curious Mind
Are you over 18 and want to see adult content?
Welcome to the Nursing Education Expert Website!
Are you over 18 and want to see adult content?
Favourite Annotations
A complete backup of dumpsmaterials.com
Are you over 18 and want to see adult content?
A complete backup of ua-banker.com.ua
Are you over 18 and want to see adult content?
A complete backup of livingwellmom.com
Are you over 18 and want to see adult content?
A complete backup of thedevilmakesthree.com
Are you over 18 and want to see adult content?
A complete backup of manorpreschool.org
Are you over 18 and want to see adult content?
A complete backup of vigilance-moustiques.com
Are you over 18 and want to see adult content?
Text
SCITOOLS HOME
SciTools is a collaborative effort to produce powerful Python-based open-source tools for Earth scientists. Initially started at the Met Office in 2010, SciTools has grown into a diverse community of partners and collaborators from around the world. SciTools is responsible for the maintenance of a number of key packages such asIris and Cartopy
USING THE CARTOPY SHAPEREADER Using the cartopy shapereader. ¶. Cartopy provides an object oriented shapefile reader based on top of the pyshp module to provide easy, programmatic, access to standard vector datasets. Provides an interface for accessing the contents of a shapefile. The primary methods used on a Reader instance are records () and geometries (). USING CARTOPY WITH MATPLOTLIB A list of the available projections to be used with matplotlib can be found on the Cartopy projection list page.. The line plt.axes(projection=ccrs.PlateCarree()) sets up a GeoAxes instance which exposes a variety of other map related methods, in the case of the previous example, we used the coastlines() method to add coastlines to the map.. Lets create another map in a differentprojection
THE CARTOPY FEATURE INTERFACE The cartopy CRS for the geometries in this feature. Returns an iterator of (shapely) geometries for this feature. Returns an iterator of shapely geometries that intersect with the given extent. The extent is assumed to be in the CRS of the feature. If extent is None, the REGRIDDING VECTORS WITH QUIVER Regridding vectors with quiver¶. This example demonstrates the regridding functionality in quiver (there exists equivalent functionality in cartopy.mpl.geoaxes.GeoAxes.barbs()).. Regridding can be an effective way of visualising a vector field, particularly if the data is dense or warped. MORE ADVANCED MAPPING WITH CARTOPY AND MATPLOTLIB Since both quiver() and barbs() are visualisations which draw every vector supplied, there is an additional option to “regrid” the vector field into a regular grid on the target projection (done via cartopy.vector_transform.vector_scalar_to_grid()).This is enabled with the regrid_shape keyword and can have a massive impact on the effectiveness of the visualisation: CARTOPY PROJECTION LIST Defaults to 0. min_latitude - the maximum southerly extent of the projection. Defaults to -80 degrees. max_latitude - the maximum northerly extent of the projection. Defaults to 84 degrees. globe - A cartopy.crs.Globe. If omitted, a default globe is created. latitude_true_scale - the latitude where the scale is 1. CARTOPY MAP GRIDLINES AND TICK LABELS Cartopy map gridlines and tick labels¶. The Gridliner instance, often created by calling the cartopy.mpl.geoaxes.GeoAxes.gridlines() method on a cartopy.mpl.geoaxes.GeoAxes instance, has a variety of attributes which can be used to determine draw time behaviour of the gridlinesand labels.
HURRICANE_KATRINA EXAMPLE hurricane_katrina example. ¶. ( Source code) import matplotlib.patches as mpatches import matplotlib.pyplot as plt import shapely.geometry as sgeom import cartopy.crs as ccrs import cartopy.io.shapereader as shpreader def sample_data(): """ Returns a list of latitudes and a list of longitudes (lons, lats) for Hurricane Katrina (2005). The dataTICK_LABELS EXAMPLE
tick_labels example¶ (Source code)""" This example demonstrates adding tick labels to maps on rectangular projections using special tick formatters. """ import cartopy.crs as ccrs from cartopy.mpl.ticker import LongitudeFormatter, LatitudeFormatter import matplotlib.pyplot as plt def main (): plt. figure (figsize = (8, 10)) # Label axes of a Plate Carree projection with a central longitude ofSCITOOLS HOME
SciTools is a collaborative effort to produce powerful Python-based open-source tools for Earth scientists. Initially started at the Met Office in 2010, SciTools has grown into a diverse community of partners and collaborators from around the world. SciTools is responsible for the maintenance of a number of key packages such asIris and Cartopy
USING THE CARTOPY SHAPEREADER Using the cartopy shapereader. ¶. Cartopy provides an object oriented shapefile reader based on top of the pyshp module to provide easy, programmatic, access to standard vector datasets. Provides an interface for accessing the contents of a shapefile. The primary methods used on a Reader instance are records () and geometries (). USING CARTOPY WITH MATPLOTLIB A list of the available projections to be used with matplotlib can be found on the Cartopy projection list page.. The line plt.axes(projection=ccrs.PlateCarree()) sets up a GeoAxes instance which exposes a variety of other map related methods, in the case of the previous example, we used the coastlines() method to add coastlines to the map.. Lets create another map in a differentprojection
THE CARTOPY FEATURE INTERFACE The cartopy CRS for the geometries in this feature. Returns an iterator of (shapely) geometries for this feature. Returns an iterator of shapely geometries that intersect with the given extent. The extent is assumed to be in the CRS of the feature. If extent is None, the REGRIDDING VECTORS WITH QUIVER Regridding vectors with quiver¶. This example demonstrates the regridding functionality in quiver (there exists equivalent functionality in cartopy.mpl.geoaxes.GeoAxes.barbs()).. Regridding can be an effective way of visualising a vector field, particularly if the data is dense or warped. MORE ADVANCED MAPPING WITH CARTOPY AND MATPLOTLIB Since both quiver() and barbs() are visualisations which draw every vector supplied, there is an additional option to “regrid” the vector field into a regular grid on the target projection (done via cartopy.vector_transform.vector_scalar_to_grid()).This is enabled with the regrid_shape keyword and can have a massive impact on the effectiveness of the visualisation: CARTOPY PROJECTION LIST Defaults to 0. min_latitude - the maximum southerly extent of the projection. Defaults to -80 degrees. max_latitude - the maximum northerly extent of the projection. Defaults to 84 degrees. globe - A cartopy.crs.Globe. If omitted, a default globe is created. latitude_true_scale - the latitude where the scale is 1. CARTOPY MAP GRIDLINES AND TICK LABELS Cartopy map gridlines and tick labels¶. The Gridliner instance, often created by calling the cartopy.mpl.geoaxes.GeoAxes.gridlines() method on a cartopy.mpl.geoaxes.GeoAxes instance, has a variety of attributes which can be used to determine draw time behaviour of the gridlinesand labels.
HURRICANE_KATRINA EXAMPLE hurricane_katrina example. ¶. ( Source code) import matplotlib.patches as mpatches import matplotlib.pyplot as plt import shapely.geometry as sgeom import cartopy.crs as ccrs import cartopy.io.shapereader as shpreader def sample_data(): """ Returns a list of latitudes and a list of longitudes (lons, lats) for Hurricane Katrina (2005). The dataTICK_LABELS EXAMPLE
tick_labels example¶ (Source code)""" This example demonstrates adding tick labels to maps on rectangular projections using special tick formatters. """ import cartopy.crs as ccrs from cartopy.mpl.ticker import LongitudeFormatter, LatitudeFormatter import matplotlib.pyplot as plt def main (): plt. figure (figsize = (8, 10)) # Label axes of a Plate Carree projection with a central longitude ofSCITOOLS HOME
SciTools is a collaborative effort to produce powerful Python-based open-source tools for Earth scientists. Initially started at the Met Office in 2010, SciTools has grown into a diverse community of partners and collaborators from around the world. SciTools is responsible for the maintenance of a number of key packages such asIris and Cartopy
COORDINATE REFERENCE SYSTEMS IN CARTOPY The most common CRS subclass is itself another abstract class; the cartopy.crs.Projection class represents a 2 dimensional coordinate system which could be drawn directly as a map (i.e. on a flat piece of paper). Projection is the parent class of all projections in the Cartopy projection list.. class cartopy.crs.Projection ¶. Defines a projected coordinate system with flat topologyINSTALLING CARTOPY
The easiest route to installing cartopy is through Conda. For all platforms installing cartopy can be done with: conda install -c conda-forge cartopy. Additional options include: Enthought Canopy. Christoph Gohlke maintains unofficial Windows binaries of cartopy.OSGeo Live.
TISSOT EXAMPLE
tissot example¶ (Source code)import matplotlib.pyplot as plt import cartopy.crs as ccrs def main (): ax = plt. axes (projection = ccrs. PlateCarree ()) # make the map global rather than have it zoom in to # the extents of any plotted data ax. set_global ax. stock_img ax. coastlines ax. tissot (facecolor = 'orange', alpha = 0.4) plt. show if __name__ == '__main__': main ()CARTOPY.MPL.GEOAXES
def add_image (self, factory, * args, ** kwargs): """ Adds an image "factory" to the Axes. Any image "factory" added, will be asked to retrieve an image with associated metadata for a given bounding box at draw time. 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 AXES_GRID_BASIC EXAMPLE The script constructs an `axes_class` kwarg with Plate Carree projection and passes it to the `AxesGrid` instance. The `AxesGrid` built-in labelling is switched off, and instead a standard procedure of creating grid lines is used. Then some fake data is plotted. """ import cartopy.crs as ccrs from cartopy.mpl.geoaxes import GeoAxesfrom cartopy
CARTOPY PROJECTION LIST AzimuthalEquidistant¶ class cartopy.crs.AzimuthalEquidistant(central_longitude=0.0, central_latitude=0.0, false_easting=0.0, false_northing=0.0, globe=None) ¶. An Azimuthal Equidistant projection. This projection provides accurate angles about and USING CARTOPY WITH MATPLOTLIB A list of the available projections to be used with matplotlib can be found on the Cartopy projection list page.. The line plt.axes(projection=ccrs.PlateCarree()) sets up a GeoAxes instance which exposes a variety of other map related methods, in the case of the previous example, we used the coastlines() method to add coastlines to the map.. Lets create another map in a differentprojection
MAP TILE ACQUISITION Map tile acquisition ¶. Map tile acquisition. ¶. Demonstrates cartopy’s ability to draw map tiles which are downloaded on demand from the Stamen tile server. Internally these tiles are then combined into a single image and displayed in the cartopy GeoAxes. ( Source code) # -*- coding: utf-8 -*- DRAWING A GEODETIC POLYGON Drawing a geodetic polygon¶. import matplotlib.pyplot as plt import matplotlib.patches as mpatches import cartopy.crs as ccrs desired_projections = for plot_num, desired_proj in enumerate (desired_projections): ax = plt. subplot (2, 1, plot_num + 1, projection = desired_proj) ax. set_global ax. add_patch THE CARTOPY FEATURE INTERFACE Specific Feature subclasses have been defined for common functionality, such as accessing Natural Earth or GSHHS shapefiles. class cartopy.feature.ShapelyFeature (geometries, crs, **kwargs) . A class capable of drawing a collection of shapelygeometries.
REGRIDDING VECTORS WITH QUIVER Regridding vectors with quiver¶. This example demonstrates the regridding functionality in quiver (there exists equivalent functionality in cartopy.mpl.geoaxes.GeoAxes.barbs()).. Regridding can be an effective way of visualising a vector field, particularly if the data is dense or warped. USING THE CARTOPY SHAPEREADER Using the cartopy shapereader¶. Cartopy provides an object oriented shapefile reader based on top of the pyshp module to provide easy, programmatic, access to standard vector datasets. class cartopy.io.shapereader.Reader (filename) ¶. Provides aninterface for
USING CARTOPY WITH MATPLOTLIB A list of the available projections to be used with matplotlib can be found on the Cartopy projection list page.. The line plt.axes(projection=ccrs.PlateCarree()) sets up a GeoAxes instance which exposes a variety of other map related methods, in the case of the previous example, we used the coastlines() method to add coastlines to the map.. Lets create another map in a differentprojection
MORE ADVANCED MAPPING WITH CARTOPY AND MATPLOTLIB Since both quiver() and barbs() are visualisations which draw every vector supplied, there is an additional option to “regrid” the vector field into a regular grid on the target projection (done via cartopy.vector_transform.vector_scalar_to_grid()).This is enabled with the regrid_shape keyword and can have a massive impact on the effectiveness of the visualisation: COORDINATE REFERENCE SYSTEMS IN CARTOPY The most common CRS subclass is itself another abstract class; the cartopy.crs.Projection class represents a 2 dimensional coordinate system which could be drawn directly as a map (i.e. on a flat piece of paper). Projection is the parent class of all projections in the Cartopy projection list.. class cartopy.crs.Projection ¶. Defines a projected coordinate system with flat topologyINSTALLING CARTOPY
Pre-built binaries¶. The easiest route to installing cartopy is through Conda.For all platforms installing cartopy can be done with: CARTOPY PROJECTION LIST AzimuthalEquidistant¶ class cartopy.crs.AzimuthalEquidistant (central_longitude=0.0, central_latitude=0.0, false_easting=0.0, false_northing=0.0, globe=None) ¶. An Azimuthal Equidistant projection. This projection provides accurate angles about andTICK_LABELS EXAMPLE
tick_labels example¶ (Source code)""" This example demonstrates adding tick labels to maps on rectangular projections using special tick formatters. """ import cartopy.crs as ccrs from cartopy.mpl.ticker import LongitudeFormatter, LatitudeFormatter import matplotlib.pyplot as plt def main (): plt. figure (figsize = (8, 10)) # Label axes of a Plate Carree projection with a central longitude ofDRAWING CONTOURS
Drawing contours¶. import matplotlib.pyplot as plt import cartopy.crs as ccrs from cartopy.examples.waves import sample_data ax = plt. axes (projection = ccrs. Robinson ()) ax. set_global lons, lats, data = sample_data (shape = (20, 40)) plt. contourf (lons, lats, data, transform = ccrs. PlateCarree ()) ax. coastlines ax. gridlines plt. show (Source code, png) THE CARTOPY FEATURE INTERFACE Specific Feature subclasses have been defined for common functionality, such as accessing Natural Earth or GSHHS shapefiles. class cartopy.feature.ShapelyFeature (geometries, crs, **kwargs) . A class capable of drawing a collection of shapelygeometries.
REGRIDDING VECTORS WITH QUIVER Regridding vectors with quiver¶. This example demonstrates the regridding functionality in quiver (there exists equivalent functionality in cartopy.mpl.geoaxes.GeoAxes.barbs()).. Regridding can be an effective way of visualising a vector field, particularly if the data is dense or warped. USING THE CARTOPY SHAPEREADER Using the cartopy shapereader¶. Cartopy provides an object oriented shapefile reader based on top of the pyshp module to provide easy, programmatic, access to standard vector datasets. class cartopy.io.shapereader.Reader (filename) ¶. Provides aninterface for
USING CARTOPY WITH MATPLOTLIB A list of the available projections to be used with matplotlib can be found on the Cartopy projection list page.. The line plt.axes(projection=ccrs.PlateCarree()) sets up a GeoAxes instance which exposes a variety of other map related methods, in the case of the previous example, we used the coastlines() method to add coastlines to the map.. Lets create another map in a differentprojection
MORE ADVANCED MAPPING WITH CARTOPY AND MATPLOTLIB Since both quiver() and barbs() are visualisations which draw every vector supplied, there is an additional option to “regrid” the vector field into a regular grid on the target projection (done via cartopy.vector_transform.vector_scalar_to_grid()).This is enabled with the regrid_shape keyword and can have a massive impact on the effectiveness of the visualisation: COORDINATE REFERENCE SYSTEMS IN CARTOPY The most common CRS subclass is itself another abstract class; the cartopy.crs.Projection class represents a 2 dimensional coordinate system which could be drawn directly as a map (i.e. on a flat piece of paper). Projection is the parent class of all projections in the Cartopy projection list.. class cartopy.crs.Projection ¶. Defines a projected coordinate system with flat topologyINSTALLING CARTOPY
Pre-built binaries¶. The easiest route to installing cartopy is through Conda.For all platforms installing cartopy can be done with: CARTOPY PROJECTION LIST AzimuthalEquidistant¶ class cartopy.crs.AzimuthalEquidistant (central_longitude=0.0, central_latitude=0.0, false_easting=0.0, false_northing=0.0, globe=None) ¶. An Azimuthal Equidistant projection. This projection provides accurate angles about andTICK_LABELS EXAMPLE
tick_labels example¶ (Source code)""" This example demonstrates adding tick labels to maps on rectangular projections using special tick formatters. """ import cartopy.crs as ccrs from cartopy.mpl.ticker import LongitudeFormatter, LatitudeFormatter import matplotlib.pyplot as plt def main (): plt. figure (figsize = (8, 10)) # Label axes of a Plate Carree projection with a central longitude ofDRAWING CONTOURS
Drawing contours¶. import matplotlib.pyplot as plt import cartopy.crs as ccrs from cartopy.examples.waves import sample_data ax = plt. axes (projection = ccrs. Robinson ()) ax. set_global lons, lats, data = sample_data (shape = (20, 40)) plt. contourf (lons, lats, data, transform = ccrs. PlateCarree ()) ax. coastlines ax. gridlines plt. show (Source code, png)SCITOOLS HOME
SciTools Open tools for the analysis and visualisation of Earth science data SciTools is a collaborative effort to produce powerful Python-based open-source tools for Earth scientists. USING CARTOPY WITH MATPLOTLIB A list of the available projections to be used with matplotlib can be found on the Cartopy projection list page.. The line plt.axes(projection=ccrs.PlateCarree()) sets up a GeoAxes instance which exposes a variety of other map related methods, in the case of the previous example, we used the coastlines() method to add coastlines to the map.. Lets create another map in a differentprojection
COORDINATE REFERENCE SYSTEMS IN CARTOPY The most common CRS subclass is itself another abstract class; the cartopy.crs.Projection class represents a 2 dimensional coordinate system which could be drawn directly as a map (i.e. on a flat piece of paper). Projection is the parent class of all projections in the Cartopy projection list.. class cartopy.crs.Projection ¶. Defines a projected coordinate system with flat topologyINSTALLING CARTOPY
Pre-built binaries¶. The easiest route to installing cartopy is through Conda.For all platforms installing cartopy can be done with: CARTOPY MATPLOTLIB INTEGRATION REFERENCE DOCUMENT Cartopy matplotlib integration reference document¶. The primary class for integrating cartopy into matplotlib is the GeoAxes, which is a subclass of a normal matplotlib Axes. THE CARTOPY FEATURE INTERFACE WITH MATPLOTLIB The cartopy Feature interface with matplotlib¶ class cartopy.feature.Feature(crs, **kwargs) ¶. Represents a collection of points, lines and polygons with convenience methods for common drawing and filtering operations. CARTOPY PROJECTION LIST AzimuthalEquidistant¶ class cartopy.crs.AzimuthalEquidistant(central_longitude=0.0, central_latitude=0.0, false_easting=0.0, false_northing=0.0, globe=None) ¶. An Azimuthal Equidistant projection. This projection provides accurate angles about andDRAWING CONTOURS
Drawing contours¶. import matplotlib.pyplot as plt import cartopy.crs as ccrs from cartopy.examples.waves import sample_data ax = plt. axes (projection = ccrs. Robinson ()) ax. set_global lons, lats, data = sample_data (shape = (20, 40)) plt. contourf (lons, lats, data, transform = ccrs. PlateCarree ()) ax. coastlines ax. gridlines plt. show (Source code, png) AXES_GRID_BASIC EXAMPLE Previous topic. Plotting the Aurora Forecast from NOAA on Orthographic Polar Projection. Next topic. barbs example MAP TILE ACQUISITION Map tile acquisition¶. Demonstrates cartopy’s ability to draw map tiles which are downloaded on demand from the Stamen tile server. Internally these tiles are then combined into a single image and displayed in the cartopy GeoAxes. REGRIDDING VECTORS WITH QUIVER Regridding vectors with quiver¶. This example demonstrates the regridding functionality in quiver (there exists equivalent functionality in cartopy.mpl.geoaxes.GeoAxes.barbs()).. Regridding can be an effective way of visualising a vector field, particularly if the data is dense or warped. USING CARTOPY WITH MATPLOTLIB A list of the available projections to be used with matplotlib can be found on the Cartopy projection list page.. The line plt.axes(projection=ccrs.PlateCarree()) sets up a GeoAxes instance which exposes a variety of other map related methods, in the case of the previous example, we used the coastlines() method to add coastlines to the map.. Lets create another map in a differentprojection
USING THE CARTOPY SHAPEREADER Using the cartopy shapereader¶. Cartopy provides an object oriented shapefile reader based on top of the pyshp module to provide easy, programmatic, access to standard vector datasets. class cartopy.io.shapereader.Reader (filename) ¶. Provides aninterface for
THE CARTOPY FEATURE INTERFACE The cartopy CRS for the geometries in this feature. Returns an iterator of (shapely) geometries for this feature. Returns an iterator of shapely geometries that intersect with the given extent. The extent is assumed to be in the CRS of the feature. If extent is None, the MORE ADVANCED MAPPING WITH CARTOPY AND MATPLOTLIB Since both quiver() and barbs() are visualisations which draw every vector supplied, there is an additional option to “regrid” the vector field into a regular grid on the target projection (done via cartopy.vector_transform.vector_scalar_to_grid()).This is enabled with the regrid_shape keyword and can have a massive impact on the effectiveness of the visualisation: COORDINATE REFERENCE SYSTEMS IN CARTOPY The most common CRS subclass is itself another abstract class; the cartopy.crs.Projection class represents a 2 dimensional coordinate system which could be drawn directly as a map (i.e. on a flat piece of paper). Projection is the parent class of all projections in the Cartopy projection list.. class cartopy.crs.Projection ¶. Defines a projected coordinate system with flat topology THE CARTOPY FEATURE INTERFACE WITH MATPLOTLIB The cartopy Feature interface with matplotlib¶ class cartopy.feature.Feature(crs, **kwargs) ¶. Represents a collection of points, lines and polygons with convenience methods for common drawing and filtering operations.TICK_LABELS EXAMPLE
tick_labels example¶ (Source code)""" This example demonstrates adding tick labels to maps on rectangular projections using special tick formatters. """ import cartopy.crs as ccrs from cartopy.mpl.ticker import LongitudeFormatter, LatitudeFormatter import matplotlib.pyplot as plt def main (): plt. figure (figsize = (8, 10)) # Label axes of a Plate Carree projection with a central longitude of REGRIDDING VECTORS WITH QUIVER Regridding vectors with quiver¶. This example demonstrates the regridding functionality in quiver (there exists equivalent functionality in cartopy.mpl.geoaxes.GeoAxes.barbs()).. Regridding can be an effective way of visualising a vector field, particularly if the data is dense or warped. USING CARTOPY WITH MATPLOTLIB A list of the available projections to be used with matplotlib can be found on the Cartopy projection list page.. The line plt.axes(projection=ccrs.PlateCarree()) sets up a GeoAxes instance which exposes a variety of other map related methods, in the case of the previous example, we used the coastlines() method to add coastlines to the map.. Lets create another map in a differentprojection
USING THE CARTOPY SHAPEREADER Using the cartopy shapereader¶. Cartopy provides an object oriented shapefile reader based on top of the pyshp module to provide easy, programmatic, access to standard vector datasets. class cartopy.io.shapereader.Reader (filename) ¶. Provides aninterface for
THE CARTOPY FEATURE INTERFACE The cartopy CRS for the geometries in this feature. Returns an iterator of (shapely) geometries for this feature. Returns an iterator of shapely geometries that intersect with the given extent. The extent is assumed to be in the CRS of the feature. If extent is None, the MORE ADVANCED MAPPING WITH CARTOPY AND MATPLOTLIB Since both quiver() and barbs() are visualisations which draw every vector supplied, there is an additional option to “regrid” the vector field into a regular grid on the target projection (done via cartopy.vector_transform.vector_scalar_to_grid()).This is enabled with the regrid_shape keyword and can have a massive impact on the effectiveness of the visualisation: COORDINATE REFERENCE SYSTEMS IN CARTOPY The most common CRS subclass is itself another abstract class; the cartopy.crs.Projection class represents a 2 dimensional coordinate system which could be drawn directly as a map (i.e. on a flat piece of paper). Projection is the parent class of all projections in the Cartopy projection list.. class cartopy.crs.Projection ¶. Defines a projected coordinate system with flat topology THE CARTOPY FEATURE INTERFACE WITH MATPLOTLIB The cartopy Feature interface with matplotlib¶ class cartopy.feature.Feature(crs, **kwargs) ¶. Represents a collection of points, lines and polygons with convenience methods for common drawing and filtering operations.TICK_LABELS EXAMPLE
tick_labels example¶ (Source code)""" This example demonstrates adding tick labels to maps on rectangular projections using special tick formatters. """ import cartopy.crs as ccrs from cartopy.mpl.ticker import LongitudeFormatter, LatitudeFormatter import matplotlib.pyplot as plt def main (): plt. figure (figsize = (8, 10)) # Label axes of a Plate Carree projection with a central longitude ofSCITOOLS HOME
SciTools is a collaborative effort to produce powerful Python-based open-source tools for Earth scientists. Initially started at the Met Office in 2010, SciTools has grown into a diverse community of partners and collaborators from around the world. SciTools is responsible for the maintenance of a number of key packages such asIris and Cartopy
MORE ADVANCED MAPPING WITH CARTOPY AND MATPLOTLIB Since both quiver() and barbs() are visualisations which draw every vector supplied, there is an additional option to “regrid” the vector field into a regular grid on the target projection (done via cartopy.vector_transform.vector_scalar_to_grid()).This is enabled with the regrid_shape keyword and can have a massive impact on the effectiveness of the visualisation:INSTALLING CARTOPY
The easiest route to installing cartopy is through Conda. For all platforms installing cartopy can be done with: conda install -c conda-forge cartopy. Additional options include: Enthought Canopy. Christoph Gohlke maintains unofficial Windows binaries of cartopy.OSGeo Live.
CARTOPY PROJECTION LIST Defaults to 0. min_latitude - the maximum southerly extent of the projection. Defaults to -80 degrees. max_latitude - the maximum northerly extent of the projection. Defaults to 84 degrees. globe - A cartopy.crs.Globe. If omitted, a default globe is created. latitude_true_scale - the latitude where the scale is 1. CARTOPY MATPLOTLIB INTEGRATION REFERENCE DOCUMENT Cartopy matplotlib integration reference document. ¶. The primary class for integrating cartopy into matplotlib is the GeoAxes, which is a subclass of a normal matplotlib Axes. The GeoAxes class adds extra functionality to an axes which is specific to drawing maps. The majority of the methods which have been specialised from the originalAxes
CARTOPY PROJECTION LIST AzimuthalEquidistant¶ class cartopy.crs.AzimuthalEquidistant(central_longitude=0.0, central_latitude=0.0, false_easting=0.0, false_northing=0.0, globe=None) ¶. An Azimuthal Equidistant projection. This projection provides accurate angles about andCARTOPY.MPL.GEOAXES
def add_image (self, factory, * args, ** kwargs): """ Adds an image "factory" to the Axes. Any image "factory" added, will be asked to retrieve an image with associated metadata for a given bounding box at draw time. 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 DRAWING A GEODETIC POLYGON Drawing a geodetic polygon¶. import matplotlib.pyplot as plt import matplotlib.patches as mpatches import cartopy.crs as ccrs desired_projections = for plot_num, desired_proj in enumerate (desired_projections): ax = plt. subplot (2, 1, plot_num + 1, projection = desired_proj) ax. set_global ax. add_patch AXES_GRID_BASIC EXAMPLE The script constructs an `axes_class` kwarg with Plate Carree projection and passes it to the `AxesGrid` instance. The `AxesGrid` built-in labelling is switched off, and instead a standard procedure of creating grid lines is used. Then some fake data is plotted. """ import cartopy.crs as ccrs from cartopy.mpl.geoaxes import GeoAxesfrom cartopy
STREAMPLOT EXAMPLE
Previous topic. Modifying the boundary/neatline of a map in cartopy. Next topic. tick_labels exampleSCITOOLS HOME
SciTools is a collaborative effort to produce powerful Python-based open-source tools for Earth scientists. Initially started at the Met Office in 2010, SciTools has grown into a diverse community of partners and collaborators from around the world. SciTools is responsible for the maintenance of a number of key packages such asIris and Cartopy
THE CARTOPY FEATURE INTERFACE The cartopy Feature interface. ¶. The data copyright, license and attribution can be blended on the map using text annotations (mpl docs) as shown in feature_creation. class cartopy.feature.Feature(crs, **kwargs) ¶. Represents a collection of points, lines and polygons with convenience methods for common drawing and filteringoperations.
COORDINATE REFERENCE SYSTEMS IN CARTOPY The most common CRS subclass is itself another abstract class; the cartopy.crs.Projection class represents a 2 dimensional coordinate system which could be drawn directly as a map (i.e. on a flat piece of paper). Projection is the parent class of all projections in the Cartopy projection list.. class cartopy.crs.Projection ¶. Defines a projected coordinate system with flat topology MORE ADVANCED MAPPING WITH CARTOPY AND MATPLOTLIB Since both quiver() and barbs() are visualisations which draw every vector supplied, there is an additional option to “regrid” the vector field into a regular grid on the target projection (done via cartopy.vector_transform.vector_scalar_to_grid()).This is enabled with the regrid_shape keyword and can have a massive impact on the effectiveness of the visualisation: USING THE CARTOPY SHAPEREADER Using the cartopy shapereader. ¶. Cartopy provides an object oriented shapefile reader based on top of the pyshp module to provide easy, programmatic, access to standard vector datasets. Provides an interface for accessing the contents of a shapefile. The primary methods used on a Reader instance are records () and geometries (). REGRIDDING VECTORS WITH QUIVER Regridding vectors with quiver¶. This example demonstrates the regridding functionality in quiver (there exists equivalent functionality in cartopy.mpl.geoaxes.GeoAxes.barbs()).. Regridding can be an effective way of visualising a vector field, particularly if the data is dense or warped. CARTOPY MAP GRIDLINES AND TICK LABELS Cartopy map gridlines and tick labels¶. The Gridliner instance, often created by calling the cartopy.mpl.geoaxes.GeoAxes.gridlines() method on a cartopy.mpl.geoaxes.GeoAxes instance, has a variety of attributes which can be used to determine draw time behaviour of the gridlinesand labels.
TISSOT EXAMPLE
tissot example¶ (Source code)import matplotlib.pyplot as plt import cartopy.crs as ccrs def main (): ax = plt. axes (projection = ccrs. PlateCarree ()) # make the map global rather than have it zoom in to # the extents of any plotted data ax. set_global ax. stock_img ax. coastlines ax. tissot (facecolor = 'orange', alpha = 0.4) plt. show if __name__ == '__main__': main () HURRICANE_KATRINA EXAMPLE hurricane_katrina example. ¶. ( Source code) import matplotlib.patches as mpatches import matplotlib.pyplot as plt import shapely.geometry as sgeom import cartopy.crs as ccrs import cartopy.io.shapereader as shpreader def sample_data(): """ Returns a list of latitudes and a list of longitudes (lons, lats) for Hurricane Katrina (2005). The dataTICK_LABELS EXAMPLE
tick_labels example¶ (Source code)""" This example demonstrates adding tick labels to maps on rectangular projections using special tick formatters. """ import cartopy.crs as ccrs from cartopy.mpl.ticker import LongitudeFormatter, LatitudeFormatter import matplotlib.pyplot as plt def main (): plt. figure (figsize = (8, 10)) # Label axes of a Plate Carree projection with a central longitude ofSCITOOLS HOME
SciTools is a collaborative effort to produce powerful Python-based open-source tools for Earth scientists. Initially started at the Met Office in 2010, SciTools has grown into a diverse community of partners and collaborators from around the world. SciTools is responsible for the maintenance of a number of key packages such asIris and Cartopy
THE CARTOPY FEATURE INTERFACE The cartopy Feature interface. ¶. The data copyright, license and attribution can be blended on the map using text annotations (mpl docs) as shown in feature_creation. class cartopy.feature.Feature(crs, **kwargs) ¶. Represents a collection of points, lines and polygons with convenience methods for common drawing and filteringoperations.
COORDINATE REFERENCE SYSTEMS IN CARTOPY The most common CRS subclass is itself another abstract class; the cartopy.crs.Projection class represents a 2 dimensional coordinate system which could be drawn directly as a map (i.e. on a flat piece of paper). Projection is the parent class of all projections in the Cartopy projection list.. class cartopy.crs.Projection ¶. Defines a projected coordinate system with flat topology MORE ADVANCED MAPPING WITH CARTOPY AND MATPLOTLIB Since both quiver() and barbs() are visualisations which draw every vector supplied, there is an additional option to “regrid” the vector field into a regular grid on the target projection (done via cartopy.vector_transform.vector_scalar_to_grid()).This is enabled with the regrid_shape keyword and can have a massive impact on the effectiveness of the visualisation: USING THE CARTOPY SHAPEREADER Using the cartopy shapereader. ¶. Cartopy provides an object oriented shapefile reader based on top of the pyshp module to provide easy, programmatic, access to standard vector datasets. Provides an interface for accessing the contents of a shapefile. The primary methods used on a Reader instance are records () and geometries (). REGRIDDING VECTORS WITH QUIVER Regridding vectors with quiver¶. This example demonstrates the regridding functionality in quiver (there exists equivalent functionality in cartopy.mpl.geoaxes.GeoAxes.barbs()).. Regridding can be an effective way of visualising a vector field, particularly if the data is dense or warped. CARTOPY MAP GRIDLINES AND TICK LABELS Cartopy map gridlines and tick labels¶. The Gridliner instance, often created by calling the cartopy.mpl.geoaxes.GeoAxes.gridlines() method on a cartopy.mpl.geoaxes.GeoAxes instance, has a variety of attributes which can be used to determine draw time behaviour of the gridlinesand labels.
TISSOT EXAMPLE
tissot example¶ (Source code)import matplotlib.pyplot as plt import cartopy.crs as ccrs def main (): ax = plt. axes (projection = ccrs. PlateCarree ()) # make the map global rather than have it zoom in to # the extents of any plotted data ax. set_global ax. stock_img ax. coastlines ax. tissot (facecolor = 'orange', alpha = 0.4) plt. show if __name__ == '__main__': main () HURRICANE_KATRINA EXAMPLE hurricane_katrina example. ¶. ( Source code) import matplotlib.patches as mpatches import matplotlib.pyplot as plt import shapely.geometry as sgeom import cartopy.crs as ccrs import cartopy.io.shapereader as shpreader def sample_data(): """ Returns a list of latitudes and a list of longitudes (lons, lats) for Hurricane Katrina (2005). The dataTICK_LABELS EXAMPLE
tick_labels example¶ (Source code)""" This example demonstrates adding tick labels to maps on rectangular projections using special tick formatters. """ import cartopy.crs as ccrs from cartopy.mpl.ticker import LongitudeFormatter, LatitudeFormatter import matplotlib.pyplot as plt def main (): plt. figure (figsize = (8, 10)) # Label axes of a Plate Carree projection with a central longitude ofSCITOOLS HOME
SciTools is a collaborative effort to produce powerful Python-based open-source tools for Earth scientists. Initially started at the Met Office in 2010, SciTools has grown into a diverse community of partners and collaborators from around the world. SciTools is responsible for the maintenance of a number of key packages such asIris and Cartopy
REGRIDDING VECTORS WITH QUIVER Regridding vectors with quiver¶. This example demonstrates the regridding functionality in quiver (there exists equivalent functionality in cartopy.mpl.geoaxes.GeoAxes.barbs()).. Regridding can be an effective way of visualising a vector field, particularly if the data is dense or warped.INSTALLING CARTOPY
The easiest route to installing cartopy is through Conda. For all platforms installing cartopy can be done with: conda install -c conda-forge cartopy. Additional options include: Enthought Canopy. Christoph Gohlke maintains unofficial Windows binaries of cartopy.OSGeo Live.
CARTOPY PROJECTION LIST Defaults to 0. min_latitude - the maximum southerly extent of the projection. Defaults to -80 degrees. max_latitude - the maximum northerly extent of the projection. Defaults to 84 degrees. globe - A cartopy.crs.Globe. If omitted, a default globe is created. latitude_true_scale - the latitude where the scale is 1. HURRICANE_KATRINA EXAMPLE hurricane_katrina example. ¶. ( Source code) import matplotlib.patches as mpatches import matplotlib.pyplot as plt import shapely.geometry as sgeom import cartopy.crs as ccrs import cartopy.io.shapereader as shpreader def sample_data(): """ Returns a list of latitudes and a list of longitudes (lons, lats) for Hurricane Katrina (2005). The data CARTOPY PROJECTION LIST central_longitude - the central longitude. Defaults to 0. min_latitude - the maximum southerly extent of the projection. Defaults to -80 degrees. max_latitude - the maximum northerly extent of the projection. Defaults to 84 degrees. globe - A cartopy.crs.Globe. If omitted, a default globe is created. THE CARTOPY FEATURE INTERFACE WITH MATPLOTLIB The cartopy CRS for the geometries in this feature. Returns an iterator of (shapely) geometries for this feature. Returns an iterator of shapely geometries that intersect with the given extent. The extent is assumed to be in the CRS of the feature. If extent is None, the AXES_GRID_BASIC EXAMPLE The script constructs an `axes_class` kwarg with Plate Carree projection and passes it to the `AxesGrid` instance. The `AxesGrid` built-in labelling is switched off, and instead a standard procedure of creating grid lines is used. Then some fake data is plotted. """ import cartopy.crs as ccrs from cartopy.mpl.geoaxes import GeoAxesfrom cartopy
MAP TILE ACQUISITION Map tile acquisition ¶. Map tile acquisition. ¶. Demonstrates cartopy’s ability to draw map tiles which are downloaded on demand from the Stamen tile server. Internally these tiles are then combined into a single image and displayed in the cartopy GeoAxes. ( Source code) # -*- coding: utf-8 -*- USING CARTOPY WITH MATPLOTLIB A list of the available projections to be used with matplotlib can be found on the Cartopy projection list page.. The line plt.axes(projection=ccrs.PlateCarree()) sets up a GeoAxes instance which exposes a variety of other map related methods, in the case of the previous example, we used the coastlines() method to add coastlines to the map.. Lets create another map in a differentprojection
SCITOOLS HOME
SciTools is a collaborative effort to produce powerful Python-based open-source tools for Earth scientists. Initially started at the Met Office in 2010, SciTools has grown into a diverse community of partners and collaborators from around the world. SciTools is responsible for the maintenance of a number of key packages such asIris and Cartopy
THE CARTOPY FEATURE INTERFACE The cartopy Feature interface. ¶. The data copyright, license and attribution can be blended on the map using text annotations (mpl docs) as shown in feature_creation. class cartopy.feature.Feature(crs, **kwargs) ¶. Represents a collection of points, lines and polygons with convenience methods for common drawing and filteringoperations.
COORDINATE REFERENCE SYSTEMS IN CARTOPY The most common CRS subclass is itself another abstract class; the cartopy.crs.Projection class represents a 2 dimensional coordinate system which could be drawn directly as a map (i.e. on a flat piece of paper). Projection is the parent class of all projections in the Cartopy projection list.. class cartopy.crs.Projection ¶. Defines a projected coordinate system with flat topology MORE ADVANCED MAPPING WITH CARTOPY AND MATPLOTLIB Since both quiver() and barbs() are visualisations which draw every vector supplied, there is an additional option to “regrid” the vector field into a regular grid on the target projection (done via cartopy.vector_transform.vector_scalar_to_grid()).This is enabled with the regrid_shape keyword and can have a massive impact on the effectiveness of the visualisation: USING THE CARTOPY SHAPEREADER Using the cartopy shapereader. ¶. Cartopy provides an object oriented shapefile reader based on top of the pyshp module to provide easy, programmatic, access to standard vector datasets. Provides an interface for accessing the contents of a shapefile. The primary methods used on a Reader instance are records () and geometries (). REGRIDDING VECTORS WITH QUIVER Regridding vectors with quiver¶. This example demonstrates the regridding functionality in quiver (there exists equivalent functionality in cartopy.mpl.geoaxes.GeoAxes.barbs()).. Regridding can be an effective way of visualising a vector field, particularly if the data is dense or warped. CARTOPY MAP GRIDLINES AND TICK LABELS Cartopy map gridlines and tick labels¶. The Gridliner instance, often created by calling the cartopy.mpl.geoaxes.GeoAxes.gridlines() method on a cartopy.mpl.geoaxes.GeoAxes instance, has a variety of attributes which can be used to determine draw time behaviour of the gridlinesand labels.
TISSOT EXAMPLE
tissot example¶ (Source code)import matplotlib.pyplot as plt import cartopy.crs as ccrs def main (): ax = plt. axes (projection = ccrs. PlateCarree ()) # make the map global rather than have it zoom in to # the extents of any plotted data ax. set_global ax. stock_img ax. coastlines ax. tissot (facecolor = 'orange', alpha = 0.4) plt. show if __name__ == '__main__': main () HURRICANE_KATRINA EXAMPLE hurricane_katrina example. ¶. ( Source code) import matplotlib.patches as mpatches import matplotlib.pyplot as plt import shapely.geometry as sgeom import cartopy.crs as ccrs import cartopy.io.shapereader as shpreader def sample_data(): """ Returns a list of latitudes and a list of longitudes (lons, lats) for Hurricane Katrina (2005). The dataTICK_LABELS EXAMPLE
tick_labels example¶ (Source code)""" This example demonstrates adding tick labels to maps on rectangular projections using special tick formatters. """ import cartopy.crs as ccrs from cartopy.mpl.ticker import LongitudeFormatter, LatitudeFormatter import matplotlib.pyplot as plt def main (): plt. figure (figsize = (8, 10)) # Label axes of a Plate Carree projection with a central longitude ofSCITOOLS HOME
SciTools is a collaborative effort to produce powerful Python-based open-source tools for Earth scientists. Initially started at the Met Office in 2010, SciTools has grown into a diverse community of partners and collaborators from around the world. SciTools is responsible for the maintenance of a number of key packages such asIris and Cartopy
THE CARTOPY FEATURE INTERFACE The cartopy Feature interface. ¶. The data copyright, license and attribution can be blended on the map using text annotations (mpl docs) as shown in feature_creation. class cartopy.feature.Feature(crs, **kwargs) ¶. Represents a collection of points, lines and polygons with convenience methods for common drawing and filteringoperations.
COORDINATE REFERENCE SYSTEMS IN CARTOPY The most common CRS subclass is itself another abstract class; the cartopy.crs.Projection class represents a 2 dimensional coordinate system which could be drawn directly as a map (i.e. on a flat piece of paper). Projection is the parent class of all projections in the Cartopy projection list.. class cartopy.crs.Projection ¶. Defines a projected coordinate system with flat topology MORE ADVANCED MAPPING WITH CARTOPY AND MATPLOTLIB Since both quiver() and barbs() are visualisations which draw every vector supplied, there is an additional option to “regrid” the vector field into a regular grid on the target projection (done via cartopy.vector_transform.vector_scalar_to_grid()).This is enabled with the regrid_shape keyword and can have a massive impact on the effectiveness of the visualisation: USING THE CARTOPY SHAPEREADER Using the cartopy shapereader. ¶. Cartopy provides an object oriented shapefile reader based on top of the pyshp module to provide easy, programmatic, access to standard vector datasets. Provides an interface for accessing the contents of a shapefile. The primary methods used on a Reader instance are records () and geometries (). REGRIDDING VECTORS WITH QUIVER Regridding vectors with quiver¶. This example demonstrates the regridding functionality in quiver (there exists equivalent functionality in cartopy.mpl.geoaxes.GeoAxes.barbs()).. Regridding can be an effective way of visualising a vector field, particularly if the data is dense or warped. CARTOPY MAP GRIDLINES AND TICK LABELS Cartopy map gridlines and tick labels¶. The Gridliner instance, often created by calling the cartopy.mpl.geoaxes.GeoAxes.gridlines() method on a cartopy.mpl.geoaxes.GeoAxes instance, has a variety of attributes which can be used to determine draw time behaviour of the gridlinesand labels.
TISSOT EXAMPLE
tissot example¶ (Source code)import matplotlib.pyplot as plt import cartopy.crs as ccrs def main (): ax = plt. axes (projection = ccrs. PlateCarree ()) # make the map global rather than have it zoom in to # the extents of any plotted data ax. set_global ax. stock_img ax. coastlines ax. tissot (facecolor = 'orange', alpha = 0.4) plt. show if __name__ == '__main__': main () HURRICANE_KATRINA EXAMPLE hurricane_katrina example. ¶. ( Source code) import matplotlib.patches as mpatches import matplotlib.pyplot as plt import shapely.geometry as sgeom import cartopy.crs as ccrs import cartopy.io.shapereader as shpreader def sample_data(): """ Returns a list of latitudes and a list of longitudes (lons, lats) for Hurricane Katrina (2005). The dataTICK_LABELS EXAMPLE
tick_labels example¶ (Source code)""" This example demonstrates adding tick labels to maps on rectangular projections using special tick formatters. """ import cartopy.crs as ccrs from cartopy.mpl.ticker import LongitudeFormatter, LatitudeFormatter import matplotlib.pyplot as plt def main (): plt. figure (figsize = (8, 10)) # Label axes of a Plate Carree projection with a central longitude ofSCITOOLS HOME
SciTools is a collaborative effort to produce powerful Python-based open-source tools for Earth scientists. Initially started at the Met Office in 2010, SciTools has grown into a diverse community of partners and collaborators from around the world. SciTools is responsible for the maintenance of a number of key packages such asIris and Cartopy
USING CARTOPY WITH MATPLOTLIB A list of the available projections to be used with matplotlib can be found on the Cartopy projection list page.. The line plt.axes(projection=ccrs.PlateCarree()) sets up a GeoAxes instance which exposes a variety of other map related methods, in the case of the previous example, we used the coastlines() method to add coastlines to the map.. Lets create another map in a differentprojection
INSTALLING CARTOPY
The easiest route to installing cartopy is through Conda. For all platforms installing cartopy can be done with: conda install -c conda-forge cartopy. Additional options include: Enthought Canopy. Christoph Gohlke maintains unofficial Windows binaries of cartopy.OSGeo Live.
CARTOPY PROJECTION LIST Defaults to 0. min_latitude - the maximum southerly extent of the projection. Defaults to -80 degrees. max_latitude - the maximum northerly extent of the projection. Defaults to 84 degrees. globe - A cartopy.crs.Globe. If omitted, a default globe is created. latitude_true_scale - the latitude where the scale is 1. HURRICANE_KATRINA EXAMPLE hurricane_katrina example. ¶. ( Source code) import matplotlib.patches as mpatches import matplotlib.pyplot as plt import shapely.geometry as sgeom import cartopy.crs as ccrs import cartopy.io.shapereader as shpreader def sample_data(): """ Returns a list of latitudes and a list of longitudes (lons, lats) for Hurricane Katrina (2005). The data CARTOPY PROJECTION LIST AzimuthalEquidistant¶ class cartopy.crs.AzimuthalEquidistant(central_longitude=0.0, central_latitude=0.0, false_easting=0.0, false_northing=0.0, globe=None) ¶. An Azimuthal Equidistant projection. This projection provides accurate angles about and USING CARTOPY WITH MATPLOTLIB A list of the available projections to be used with matplotlib can be found on the Cartopy projection list page.. The line plt.axes(projection=ccrs.PlateCarree()) sets up a GeoAxes instance which exposes a variety of other map related methods, in the case of the previous example, we used the coastlines() method to add coastlines to the map.. Lets create another map in a differentprojection
AXES_GRID_BASIC EXAMPLE The script constructs an `axes_class` kwarg with Plate Carree projection and passes it to the `AxesGrid` instance. The `AxesGrid` built-in labelling is switched off, and instead a standard procedure of creating grid lines is used. Then some fake data is plotted. """ import cartopy.crs as ccrs from cartopy.mpl.geoaxes import GeoAxesfrom cartopy
MAP TILE ACQUISITION Map tile acquisition ¶. Map tile acquisition. ¶. Demonstrates cartopy’s ability to draw map tiles which are downloaded on demand from the Stamen tile server. Internally these tiles are then combined into a single image and displayed in the cartopy GeoAxes. ( Source code) # -*- coding: utf-8 -*- CARTOPY.MPL.GRIDLINER Args: * axes The :class:`cartopy.mpl.geoaxes.GeoAxes` object to be drawn on. * crs The :class:`cartopy.crs.CRS` defining the coordinate system that the gridlines are drawn in. * draw_labels Toggle whether to draw labels. For finer control, attributes of :class:`Gridliner` may be modified individually. * xlocator A :class:`matplotlib.tickerSCITOOLS HOME
SciTools is a collaborative effort to produce powerful Python-based open-source tools for Earth scientists. Initially started at the Met Office in 2010, SciTools has grown into a diverse community of partners and collaborators from around the world. SciTools is responsible for the maintenance of a number of key packages such asIris and Cartopy
THE CARTOPY FEATURE INTERFACE The cartopy Feature interface. ¶. The data copyright, license and attribution can be blended on the map using text annotations (mpl docs) as shown in feature_creation. class cartopy.feature.Feature(crs, **kwargs) ¶. Represents a collection of points, lines and polygons with convenience methods for common drawing and filteringoperations.
COORDINATE REFERENCE SYSTEMS IN CARTOPY The most common CRS subclass is itself another abstract class; the cartopy.crs.Projection class represents a 2 dimensional coordinate system which could be drawn directly as a map (i.e. on a flat piece of paper). Projection is the parent class of all projections in the Cartopy projection list.. class cartopy.crs.Projection ¶. Defines a projected coordinate system with flat topology MORE ADVANCED MAPPING WITH CARTOPY AND MATPLOTLIB Since both quiver() and barbs() are visualisations which draw every vector supplied, there is an additional option to “regrid” the vector field into a regular grid on the target projection (done via cartopy.vector_transform.vector_scalar_to_grid()).This is enabled with the regrid_shape keyword and can have a massive impact on the effectiveness of the visualisation: USING THE CARTOPY SHAPEREADER Using the cartopy shapereader. ¶. Cartopy provides an object oriented shapefile reader based on top of the pyshp module to provide easy, programmatic, access to standard vector datasets. Provides an interface for accessing the contents of a shapefile. The primary methods used on a Reader instance are records () and geometries (). REGRIDDING VECTORS WITH QUIVER Regridding vectors with quiver¶. This example demonstrates the regridding functionality in quiver (there exists equivalent functionality in cartopy.mpl.geoaxes.GeoAxes.barbs()).. Regridding can be an effective way of visualising a vector field, particularly if the data is dense or warped. CARTOPY MAP GRIDLINES AND TICK LABELS Cartopy map gridlines and tick labels¶. The Gridliner instance, often created by calling the cartopy.mpl.geoaxes.GeoAxes.gridlines() method on a cartopy.mpl.geoaxes.GeoAxes instance, has a variety of attributes which can be used to determine draw time behaviour of the gridlinesand labels.
TISSOT EXAMPLE
tissot example¶ (Source code)import matplotlib.pyplot as plt import cartopy.crs as ccrs def main (): ax = plt. axes (projection = ccrs. PlateCarree ()) # make the map global rather than have it zoom in to # the extents of any plotted data ax. set_global ax. stock_img ax. coastlines ax. tissot (facecolor = 'orange', alpha = 0.4) plt. show if __name__ == '__main__': main ()TICK_LABELS EXAMPLE
tick_labels example¶ (Source code)""" This example demonstrates adding tick labels to maps on rectangular projections using special tick formatters. """ import cartopy.crs as ccrs from cartopy.mpl.ticker import LongitudeFormatter, LatitudeFormatter import matplotlib.pyplot as plt def main (): plt. figure (figsize = (8, 10)) # Label axes of a Plate Carree projection with a central longitude of HURRICANE_KATRINA EXAMPLE hurricane_katrina example. ¶. ( Source code) import matplotlib.patches as mpatches import matplotlib.pyplot as plt import shapely.geometry as sgeom import cartopy.crs as ccrs import cartopy.io.shapereader as shpreader def sample_data(): """ Returns a list of latitudes and a list of longitudes (lons, lats) for Hurricane Katrina (2005). The dataSCITOOLS HOME
SciTools is a collaborative effort to produce powerful Python-based open-source tools for Earth scientists. Initially started at the Met Office in 2010, SciTools has grown into a diverse community of partners and collaborators from around the world. SciTools is responsible for the maintenance of a number of key packages such asIris and Cartopy
THE CARTOPY FEATURE INTERFACE The cartopy Feature interface. ¶. The data copyright, license and attribution can be blended on the map using text annotations (mpl docs) as shown in feature_creation. class cartopy.feature.Feature(crs, **kwargs) ¶. Represents a collection of points, lines and polygons with convenience methods for common drawing and filteringoperations.
COORDINATE REFERENCE SYSTEMS IN CARTOPY The most common CRS subclass is itself another abstract class; the cartopy.crs.Projection class represents a 2 dimensional coordinate system which could be drawn directly as a map (i.e. on a flat piece of paper). Projection is the parent class of all projections in the Cartopy projection list.. class cartopy.crs.Projection ¶. Defines a projected coordinate system with flat topology MORE ADVANCED MAPPING WITH CARTOPY AND MATPLOTLIB Since both quiver() and barbs() are visualisations which draw every vector supplied, there is an additional option to “regrid” the vector field into a regular grid on the target projection (done via cartopy.vector_transform.vector_scalar_to_grid()).This is enabled with the regrid_shape keyword and can have a massive impact on the effectiveness of the visualisation: USING THE CARTOPY SHAPEREADER Using the cartopy shapereader. ¶. Cartopy provides an object oriented shapefile reader based on top of the pyshp module to provide easy, programmatic, access to standard vector datasets. Provides an interface for accessing the contents of a shapefile. The primary methods used on a Reader instance are records () and geometries (). REGRIDDING VECTORS WITH QUIVER Regridding vectors with quiver¶. This example demonstrates the regridding functionality in quiver (there exists equivalent functionality in cartopy.mpl.geoaxes.GeoAxes.barbs()).. Regridding can be an effective way of visualising a vector field, particularly if the data is dense or warped. CARTOPY MAP GRIDLINES AND TICK LABELS Cartopy map gridlines and tick labels¶. The Gridliner instance, often created by calling the cartopy.mpl.geoaxes.GeoAxes.gridlines() method on a cartopy.mpl.geoaxes.GeoAxes instance, has a variety of attributes which can be used to determine draw time behaviour of the gridlinesand labels.
TISSOT EXAMPLE
tissot example¶ (Source code)import matplotlib.pyplot as plt import cartopy.crs as ccrs def main (): ax = plt. axes (projection = ccrs. PlateCarree ()) # make the map global rather than have it zoom in to # the extents of any plotted data ax. set_global ax. stock_img ax. coastlines ax. tissot (facecolor = 'orange', alpha = 0.4) plt. show if __name__ == '__main__': main () HURRICANE_KATRINA EXAMPLE hurricane_katrina example. ¶. ( Source code) import matplotlib.patches as mpatches import matplotlib.pyplot as plt import shapely.geometry as sgeom import cartopy.crs as ccrs import cartopy.io.shapereader as shpreader def sample_data(): """ Returns a list of latitudes and a list of longitudes (lons, lats) for Hurricane Katrina (2005). The dataTICK_LABELS EXAMPLE
tick_labels example¶ (Source code)""" This example demonstrates adding tick labels to maps on rectangular projections using special tick formatters. """ import cartopy.crs as ccrs from cartopy.mpl.ticker import LongitudeFormatter, LatitudeFormatter import matplotlib.pyplot as plt def main (): plt. figure (figsize = (8, 10)) # Label axes of a Plate Carree projection with a central longitude ofSCITOOLS HOME
SciTools is a collaborative effort to produce powerful Python-based open-source tools for Earth scientists. Initially started at the Met Office in 2010, SciTools has grown into a diverse community of partners and collaborators from around the world. SciTools is responsible for the maintenance of a number of key packages such asIris and Cartopy
USING CARTOPY WITH MATPLOTLIB A list of the available projections to be used with matplotlib can be found on the Cartopy projection list page.. The line plt.axes(projection=ccrs.PlateCarree()) sets up a GeoAxes instance which exposes a variety of other map related methods, in the case of the previous example, we used the coastlines() method to add coastlines to the map.. Lets create another map in a differentprojection
INSTALLING CARTOPY
The easiest route to installing cartopy is through Conda. For all platforms installing cartopy can be done with: conda install -c conda-forge cartopy. Additional options include: Enthought Canopy. Christoph Gohlke maintains unofficial Windows binaries of cartopy.OSGeo Live.
CARTOPY PROJECTION LIST Defaults to 0. min_latitude - the maximum southerly extent of the projection. Defaults to -80 degrees. max_latitude - the maximum northerly extent of the projection. Defaults to 84 degrees. globe - A cartopy.crs.Globe. If omitted, a default globe is created. latitude_true_scale - the latitude where the scale is 1. HURRICANE_KATRINA EXAMPLE hurricane_katrina example. ¶. ( Source code) import matplotlib.patches as mpatches import matplotlib.pyplot as plt import shapely.geometry as sgeom import cartopy.crs as ccrs import cartopy.io.shapereader as shpreader def sample_data(): """ Returns a list of latitudes and a list of longitudes (lons, lats) for Hurricane Katrina (2005). The data CARTOPY PROJECTION LIST central_longitude - the central longitude. Defaults to 0. min_latitude - the maximum southerly extent of the projection. Defaults to -80 degrees. max_latitude - the maximum northerly extent of the projection. Defaults to 84 degrees. globe - A cartopy.crs.Globe. If omitted, a default globe is created. AXES_GRID_BASIC EXAMPLE The script constructs an `axes_class` kwarg with Plate Carree projection and passes it to the `AxesGrid` instance. The `AxesGrid` built-in labelling is switched off, and instead a standard procedure of creating grid lines is used. Then some fake data is plotted. """ import cartopy.crs as ccrs from cartopy.mpl.geoaxes import GeoAxesfrom cartopy
USING CARTOPY WITH MATPLOTLIB A list of the available projections to be used with matplotlib can be found on the Cartopy projection list page.. The line plt.axes(projection=ccrs.PlateCarree()) sets up a GeoAxes instance which exposes a variety of other map related methods, in the case of the previous example, we used the coastlines() method to add coastlines to the map.. Lets create another map in a differentprojection
MAP TILE ACQUISITION Map tile acquisition ¶. Map tile acquisition. ¶. Demonstrates cartopy’s ability to draw map tiles which are downloaded on demand from the Stamen tile server. Internally these tiles are then combined into a single image and displayed in the cartopy GeoAxes. ( Source code) # -*- coding: utf-8 -*- CARTOPY.MPL.GRIDLINER Args: * axes The :class:`cartopy.mpl.geoaxes.GeoAxes` object to be drawn on. * crs The :class:`cartopy.crs.CRS` defining the coordinate system that the gridlines are drawn in. * draw_labels Toggle whether to draw labels. For finer control, attributes of :class:`Gridliner` may be modified individually. * xlocator A :class:`matplotlib.ticker THE CARTOPY FEATURE INTERFACE The cartopy Feature interface. ¶. The data copyright, license and attribution can be blended on the map using text annotations (mpl docs) as shown in feature_creation. class cartopy.feature.Feature(crs, **kwargs) ¶. Represents a collection of points, lines and polygons with convenience methods for common drawing and filteringoperations.
REGRIDDING VECTORS WITH QUIVER Regridding vectors with quiver¶. This example demonstrates the regridding functionality in quiver (there exists equivalent functionality in cartopy.mpl.geoaxes.GeoAxes.barbs()).. Regridding can be an effective way of visualising a vector field, particularly if the data is dense or warped. COORDINATE REFERENCE SYSTEMS IN CARTOPY The most common CRS subclass is itself another abstract class; the cartopy.crs.Projection class represents a 2 dimensional coordinate system which could be drawn directly as a map (i.e. on a flat piece of paper). Projection is the parent class of all projections in the Cartopy projection list.. class cartopy.crs.Projection ¶. Defines a projected coordinate system with flat topology USING CARTOPY WITH MATPLOTLIB A list of the available projections to be used with matplotlib can be found on the Cartopy projection list page.. The line plt.axes(projection=ccrs.PlateCarree()) sets up a GeoAxes instance which exposes a variety of other map related methods, in the case of the previous example, we used the coastlines() method to add coastlines to the map.. Lets create another map in a differentprojection
USING THE CARTOPY SHAPEREADER Using the cartopy shapereader. ¶. Cartopy provides an object oriented shapefile reader based on top of the pyshp module to provide easy, programmatic, access to standard vector datasets. Provides an interface for accessing the contents of a shapefile. The primary methods used on a Reader instance are records () and geometries (). THE CARTOPY FEATURE INTERFACE WITH MATPLOTLIB The cartopy CRS for the geometries in this feature. Returns an iterator of (shapely) geometries for this feature. Returns an iterator of shapely geometries that intersect with the given extent. The extent is assumed to be in the CRS of the feature. If extent is None, the CARTOPY PROJECTION LIST central_longitude - the central longitude. Defaults to 0. min_latitude - the maximum southerly extent of the projection. Defaults to -80 degrees. max_latitude - the maximum northerly extent of the projection. Defaults to 84 degrees. globe - A cartopy.crs.Globe. If omitted, a default globe is created. AXES_GRID_BASIC EXAMPLE The script constructs an `axes_class` kwarg with Plate Carree projection and passes it to the `AxesGrid` instance. The `AxesGrid` built-in labelling is switched off, and instead a standard procedure of creating grid lines is used. Then some fake data is plotted. """ import cartopy.crs as ccrs from cartopy.mpl.geoaxes import GeoAxesfrom cartopy
TICK_LABELS EXAMPLE
tick_labels example¶ (Source code)""" This example demonstrates adding tick labels to maps on rectangular projections using special tick formatters. """ import cartopy.crs as ccrs from cartopy.mpl.ticker import LongitudeFormatter, LatitudeFormatter import matplotlib.pyplot as plt def main (): plt. figure (figsize = (8, 10)) # Label axes of a Plate Carree projection with a central longitude of DRAWING A GEODETIC POLYGON Drawing a geodetic polygon¶. import matplotlib.pyplot as plt import matplotlib.patches as mpatches import cartopy.crs as ccrs desired_projections = for plot_num, desired_proj in enumerate (desired_projections): ax = plt. subplot (2, 1, plot_num + 1, projection = desired_proj) ax. set_global ax. add_patch THE CARTOPY FEATURE INTERFACE The cartopy Feature interface. ¶. The data copyright, license and attribution can be blended on the map using text annotations (mpl docs) as shown in feature_creation. class cartopy.feature.Feature(crs, **kwargs) ¶. Represents a collection of points, lines and polygons with convenience methods for common drawing and filteringoperations.
REGRIDDING VECTORS WITH QUIVER Regridding vectors with quiver¶. This example demonstrates the regridding functionality in quiver (there exists equivalent functionality in cartopy.mpl.geoaxes.GeoAxes.barbs()).. Regridding can be an effective way of visualising a vector field, particularly if the data is dense or warped. COORDINATE REFERENCE SYSTEMS IN CARTOPY The most common CRS subclass is itself another abstract class; the cartopy.crs.Projection class represents a 2 dimensional coordinate system which could be drawn directly as a map (i.e. on a flat piece of paper). Projection is the parent class of all projections in the Cartopy projection list.. class cartopy.crs.Projection ¶. Defines a projected coordinate system with flat topology USING CARTOPY WITH MATPLOTLIB A list of the available projections to be used with matplotlib can be found on the Cartopy projection list page.. The line plt.axes(projection=ccrs.PlateCarree()) sets up a GeoAxes instance which exposes a variety of other map related methods, in the case of the previous example, we used the coastlines() method to add coastlines to the map.. Lets create another map in a differentprojection
USING THE CARTOPY SHAPEREADER Using the cartopy shapereader. ¶. Cartopy provides an object oriented shapefile reader based on top of the pyshp module to provide easy, programmatic, access to standard vector datasets. Provides an interface for accessing the contents of a shapefile. The primary methods used on a Reader instance are records () and geometries (). THE CARTOPY FEATURE INTERFACE WITH MATPLOTLIB The cartopy CRS for the geometries in this feature. Returns an iterator of (shapely) geometries for this feature. Returns an iterator of shapely geometries that intersect with the given extent. The extent is assumed to be in the CRS of the feature. If extent is None, the CARTOPY PROJECTION LIST central_longitude - the central longitude. Defaults to 0. min_latitude - the maximum southerly extent of the projection. Defaults to -80 degrees. max_latitude - the maximum northerly extent of the projection. Defaults to 84 degrees. globe - A cartopy.crs.Globe. If omitted, a default globe is created. AXES_GRID_BASIC EXAMPLE The script constructs an `axes_class` kwarg with Plate Carree projection and passes it to the `AxesGrid` instance. The `AxesGrid` built-in labelling is switched off, and instead a standard procedure of creating grid lines is used. Then some fake data is plotted. """ import cartopy.crs as ccrs from cartopy.mpl.geoaxes import GeoAxesfrom cartopy
TICK_LABELS EXAMPLE
tick_labels example¶ (Source code)""" This example demonstrates adding tick labels to maps on rectangular projections using special tick formatters. """ import cartopy.crs as ccrs from cartopy.mpl.ticker import LongitudeFormatter, LatitudeFormatter import matplotlib.pyplot as plt def main (): plt. figure (figsize = (8, 10)) # Label axes of a Plate Carree projection with a central longitude of DRAWING A GEODETIC POLYGON Drawing a geodetic polygon¶. import matplotlib.pyplot as plt import matplotlib.patches as mpatches import cartopy.crs as ccrs desired_projections = for plot_num, desired_proj in enumerate (desired_projections): ax = plt. subplot (2, 1, plot_num + 1, projection = desired_proj) ax. set_global ax. add_patchSCITOOLS HOME
SciTools is a collaborative effort to produce powerful Python-based open-source tools for Earth scientists. Initially started at the Met Office in 2010, SciTools has grown into a diverse community of partners and collaborators from around the world. SciTools is responsible for the maintenance of a number of key packages such asIris and Cartopy
CARTOPY PROJECTION LIST Defaults to 0. min_latitude - the maximum southerly extent of the projection. Defaults to -80 degrees. max_latitude - the maximum northerly extent of the projection. Defaults to 84 degrees. globe - A cartopy.crs.Globe. If omitted, a default globe is created. latitude_true_scale - the latitude where the scale is 1. CARTOPY MAP GRIDLINES AND TICK LABELS Cartopy map gridlines and tick labels¶. The Gridliner instance, often created by calling the cartopy.mpl.geoaxes.GeoAxes.gridlines() method on a cartopy.mpl.geoaxes.GeoAxes instance, has a variety of attributes which can be used to determine draw time behaviour of the gridlinesand labels.
MORE ADVANCED MAPPING WITH CARTOPY AND MATPLOTLIB Since both quiver() and barbs() are visualisations which draw every vector supplied, there is an additional option to “regrid” the vector field into a regular grid on the target projection (done via cartopy.vector_transform.vector_scalar_to_grid()).This is enabled with the regrid_shape keyword and can have a massive impact on the effectiveness of the visualisation: AXES_GRID_BASIC EXAMPLE The script constructs an `axes_class` kwarg with Plate Carree projection and passes it to the `AxesGrid` instance. The `AxesGrid` built-in labelling is switched off, and instead a standard procedure of creating grid lines is used. Then some fake data is plotted. """ import cartopy.crs as ccrs from cartopy.mpl.geoaxes import GeoAxesfrom cartopy
INSTALLING CARTOPY
The easiest route to installing cartopy is through Conda. For all platforms installing cartopy can be done with: conda install -c conda-forge cartopy. Additional options include: Enthought Canopy. Christoph Gohlke maintains unofficial Windows binaries of cartopy.OSGeo Live.
CARTOPY.MPL.GEOAXES
def add_image (self, factory, * args, ** kwargs): """ Adds an image "factory" to the Axes. Any image "factory" added, will be asked to retrieve an image with associated metadata for a given bounding box at draw time. 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 MAP TILE ACQUISITION Map tile acquisition ¶. Map tile acquisition. ¶. Demonstrates cartopy’s ability to draw map tiles which are downloaded on demand from the Stamen tile server. Internally these tiles are then combined into a single image and displayed in the cartopy GeoAxes. ( Source code) # -*- coding: utf-8 -*- DRAWING A GEODETIC POLYGON Drawing a geodetic polygon¶. import matplotlib.pyplot as plt import matplotlib.patches as mpatches import cartopy.crs as ccrs desired_projections = for plot_num, desired_proj in enumerate (desired_projections): ax = plt. subplot (2, 1, plot_num + 1, projection = desired_proj) ax. set_global ax. add_patchDRAWING CONTOURS
Drawing contours¶. import matplotlib.pyplot as plt import cartopy.crs as ccrs from cartopy.examples.waves import sample_data ax = plt. axes (projection = ccrs. Robinson ()) ax. set_global lons, lats, data = sample_data (shape = (20, 40)) plt. contourf (lons, lats, data, transform = ccrs. PlateCarree ()) ax. coastlines ax. gridlines plt. show (Source code, png) Mobirise Mobirise v4.7.2SciTools
* Home
* Organisation
* Documentation
Iris Cartopy iris-gribcf-units
* GitHub
Iris Cartopy
cf-units
iris-grib
All Repositories
SCITOOLS
OPEN TOOLS FOR THE ANALYSIS AND VISUALISATION OF EARTH SCIENCE DATA SciTools is a collaborative effort to produce powerful Python-based open-source tools for Earth scientists. Initially started at the Met Office in 2010, SciTools has grown into a diverse community of partners and collaborators from around the world. SciTools is responsible for the maintenance of a number of key packages such as Iris and Cartopy, and continues to develop new and innovative tools for the Earth scientist's toolkit.Iris
Cartopy
cf-units
Additional ResourcesIRIS
The Iris package implements a data model to create a data abstraction layer which isolates analysis and visualisation code from data format specifics. The data model we have chosen is the CF Data Model. The implementation of this model we have called an Iris Cube. Iris currently supports read/write access to a range of data formats, including (CF-)netCDF, GRIB, and PP; fundamental data manipulation operations, such as arithmetic, interpolation, and statistics; and a range of integrated plotting options.Learn more...
CARTOPY
Cartopy is a Python package designed for geospatial data processing in order to produce maps and other geospatial data analyses. Key features of cartopy are its object oriented projection definitions, and its ability to transform points, lines, vectors, polygons and images between those projections. You will find cartopy especially useful for large area / small scale data, where Cartesian assumptions of spherical data traditionallybreak down.
Learn more...
ADDITIONAL TOOLS AND RESOURCES THERE ARE A NUMBER OF OTHER PACKAGES AND RESOURCES DEVELOPED UNDER THE SCITOOLS ORGANISATION ON GITHUB . SOME OF THE MORE PROMINENT ONES ARE LISTED BELOW. * CF-UNITS - is a wrapper class to support Unidata/UCAR UDUNITS-2, and the netcdftime calendar functionality. Provides units of measure. Learn more... * IRIS-GRIB - provides functionality for converting between weather and climate datasets that are stored as GRIB files and Iris cubes. Learn more... * NC-TIME-AXIS - provides support for non-gregorian datetimes in matplotlib Learn more... * SCITOOLS/COURSES - several courses for the benefit of scientific researchers, particularly in the fields of oceanography and meteorology. Learn more...__ __ __
* About SciTools
* Contact us
* Privacy Policy
* Governance
British Crown Copyright 2019, Met Office - All Rights ReservedDetails
Copyright © 2024 ArchiveBay.com. All rights reserved. Terms of Use | Privacy Policy | DMCA | 2021 | Feedback | Advertising | RSS 2.0