Basemap utility functions — Basemap tutorial 0.1 documentation

Adds a longitude value, and a columns of values to the data array. Useful to fill the missing data when the data covers the whole longitudes. Draws the color legend at one of the edges of the map. The use is almost the same as in matplotlib colorbar drawmapscale(lon, lat, lon0, lat0, length, barstyle=’simple’, units=’km’, fontsize=9, yoffset=None, labelstyle=’simple’, fontcolor=’k’, fillcolor1=’w’, fillcolor2=’k’, ax=None, format=’%d’, zorder=None) A great circle is the maximum circle that can be drawn that passes through two points in a sphere (excepting when the points are the antipodes) When using Mercator projection, the meridians and parallels are straight lines, but the great circles usually are not Useful to create smoother plots or to have more elements when using barbs or quiver. Also useful when using maskoceans. The alternative way, which accepts multiple points and, in fact could be used with any polygon get from a shapefile (See Filling polygons) makegrid method creates an arbitrary grid of equally spaced points in the map projection. Used to get the longitudes and latitudes that would form an an equally spaced grid using the map projection. The first example (line 22), creates the mask directly. The result is coarse, due to the low resolution of the input data, not because of the maskoceans arguments In this case, the resolution has been set to ‘h’, the maximum. The lakes are now masked, but the Florida coast still shows the pixel size used to create the mask. Finally, when the grid is set at the finer resolution, the Florida coast smoothly matches the coast line. Given two matrices of the east-west and north-south components of a vectorial field, and the longitude and latitude of the points, rotates the vectors so they represent the direction properly on the map projection Some functions, such as barbs, quiver or streamplot, that use vectorial data, asks the vector components to be in the map coordinates i.e. u is from left to right, v from up do down. If the available data is in geographical coordinates i.e. west-east and north-south, these coordinates have to be rotated or the vector direction won’t be plot properly. This is the aim of the rotate_vector method. The method transform_scalar does the same function, but changing the grid size at the same time (interpolating the points) This method is usually called internally, and changes the matplotlib axes to the shape of the projection. Most of the methods, such as drawcountries, drawrivers, readshapefile... call this method at the end, so it’s difficult to put an example to show how does it work: Adds values to the longitudes so they can fit the correct map origin. Changes also the data array so it can fit the new origin. Sometimes, the longitude data is given in an interval different from -180, 180. From 0 to 360, for instance. To draw the data properly, this values must be shifted. ..note: The main difference from shiftdata, is that the projection doesn’t need to be cylindrical, since it’s not a method from the basemap instance, and that the longitudes don’t need to have a uniform incerement Tissot’s indicatrix, or Tissot’s ellipse of distortion is the representation of a circle in a map, showing how the projection distorts it. Usually, many of them are represented to show how the distortion varies with the position. Given a matrix with scalar values in a cylindrical projection, and the longitude and latitude of the points, interpolates the points to a new matrix.. transform_scalar(datin, lons, lats, nx, ny, returnxy=False, checkbounds=False, order=1, masked=False) Given two matrices of the east-west and north-south components of a vectorial field in a cylindrical projection, and the longitude and latitude of the points, rotates the vectors so they represent the direction properly on the map projection, while interpolates the points to a new matrix.. Some functions, such as barbs, quiver or streamplot, that use vectorial data, asks the vector components to be in the map coordinates i.e. u is from left to right, v from up do down. If the available data is in geographical coordinates i.e. west-east and north-south, these coordinates have to be rotated or the vector direction won’t be plot properly. This is the aim of the rotate_vector method. When drawing barbs, quiver or stream lines, the number of available points may be too low, so interpolating them to a new matrix with more elements can be used to get a plot with a nice number of elements. transform_vector(uin, vin, lons, lats, nx, ny, returnxy=False, checkbounds=False, order=1, masked=False) Source.


Яндекс.Метрика Рейтинг@Mail.ru Free Web Counter
page counter
Last Modified:
Fatal error: Call to undefined function mdv_last_modified() in /home1/wacedu0abjm6/public_html/wp-content/themes/CherryFramework/footer.php on line 121