Questions tagged [matplotlib-basemap]

The matplotlib basemap toolkit is a library for plotting 2D data on maps in Python. It is similar in functionality to the matlab mapping toolbox, the IDL mapping facilities, GrADS, or the Generic Mapping Tools. PyNGL and CDAT are other libraries that provide similar capabilities in Python.

Homepage: http://matplotlib.github.com/basemap/

Basemap does not do any plotting on its own, but provides the facilities to transform coordinates to one of 25 different map projections (using the PROJ4 C library). Matplotlib is then used to plot contours, images, vectors, lines or points in the transformed coordinates. Shoreline, river and political boundary datasets (from Generic Mapping Tools) are provided, along with methods for plotting them. The GEOS library is used internally to clip the coastline and political boundary features to the desired map projection region.

Basemap provides facilities for reading shape files.

Basemap is geared toward the needs of earth scientists, particularly oceanographers and meteorologists. The author originally wrote Basemap to help in his research (climate and weather forecasting), since at the time CDAT was the only other tool in python for plotting data on map projections. Over the years, the capabilities of Basemap have evolved as scientists in other disciplines (such as biology, geology and geophysics) requested and contributed new features.

Deprecation Notice: As seen at the home page, "Basemap is deprecated in favor of the Cartopy project." See here for more information.

1245 questions
-1
votes
1 answer

How to plot heat map in matplotlib with label at both side right and left

UPDATED I have write down a code like the given bellow.. import pandas as pd import matplotlib.pyplot as plt import numpy as np df = pd.read_csv("data_1.csv",index_col="Group") print df fig,ax = plt.subplots(1) heatmap =…
jax
  • 3,927
  • 7
  • 41
  • 70
-1
votes
2 answers

Polar stereographic projection to regular lat/lon grid

This is a follow on from my previous question, in that this is much more specific with examples and data. I have a 304 by 448 array of ice data (in polar stereographic projection), of which the netcdf can be obtained here. The corresponding lat/lon…
J W
  • 617
  • 1
  • 9
  • 28
-1
votes
2 answers

python: Plotting data from multiple netCDF files

long story short, I am plotting climate data from a netCDF file. My only problem, I have to plot data from tens of these files, each having over a hundred data points. Luckily, they are all identically formatted, and their names are in rising order…
xyzman
  • 11
  • 7
-1
votes
2 answers

Re-arrange the array contain endpoints to creat an closed polygon in Python

For some purpose, I want to plot an polygon based on several latitude and longitude as endpoints which combined together. The example data shows like this: fig=plt.figure() ax = plt.gca() x_map1, x_map2 = 114.166,114.996 y_map1, y_map2 =…
Han Zhengzu
  • 3,694
  • 7
  • 44
  • 94
-1
votes
1 answer

Select certain indices when plotting shapefiles

My problem The shapefile xxx contain serval polygons, and I want to plot part of it. So, I typed: ## reading the xxx.shp map.readshapefile('xxx','xxx',zorder =1,) patches=[] ## generating the indice which mean I want to plot these…
Han Zhengzu
  • 3,694
  • 7
  • 44
  • 94
-1
votes
1 answer

Access coastal outlines (e.g. from Basemap, or somewhere else) without installing Basemap

I would like to have polygons or vertices of coastlines on the Earth to manipulate in Blender (and in Python stand-alone), but I would like to avoid installing into each of the multiple Pythons on my computer. Basically it looks a bit tricky to do…
uhoh
  • 3,713
  • 6
  • 42
  • 95
-1
votes
1 answer

Basemap causing data to not plot

I am getting a very strange error using basemap. No error appears, yet my 3rd plot has no data plotted when data does indeed exist. Below is my code. When run, you will see that both modis and seawifs data is plotted, but viirs is not. I can't…
Almidas
  • 379
  • 2
  • 6
  • 16
-1
votes
1 answer

Technology for visualization of geographical data. Python, matlab, Java

I am new to geographical data visualization, so I would like to ask if someone could recommend me some tool for easy visualization of data on map. Particularly I have data from one European city and I need to visualize them as heat maps (eg. price…
ziky90
  • 2,627
  • 4
  • 33
  • 47
-1
votes
1 answer

Create a Student-Age graph in Python-Matplotlib

import matplotlib.pyplot as plt x = ['Eric','Jhon','bill','Daniel'] y = [10, 17, 12.5, 20] plt.plot(x,y) plt.show() When I run this code, I get this error ValueError: could not convert string to float: I want all names in list x at x-axis and…
user3628682
  • 685
  • 1
  • 11
  • 19
-1
votes
1 answer

to plot points on a country map dynamically

I am working on a taxi dataset. I want to plot them on country map. also, after plotting the trajectories of the taxis, i want the user to choose a point on the map and request him to enter an epsilon radius. After he enters a value, a circle…
-1
votes
2 answers

How to make an animated geographic heat map?

I have a list of coordinates and timestamps spread over a 24-hour period. I want to create an animated heat map which will show the map throughout the day. I've tried looking at Basemap's example gallery but the code seems a little too complex for…
seriousdev
  • 7,519
  • 8
  • 45
  • 52
-1
votes
1 answer

Program runs forever without giving an error when plotting data only on continent

I was trying to plot data only on continent. I asked a question about this before and I've got the answer here. Now when I implemented it in the code, the program will run without giving an error. However, it RUNS FOREVER. When I use ctrl + C to…
ZYX
  • 794
  • 1
  • 8
  • 12
-2
votes
1 answer

PNG Satellite image on map

i know it is simple if I had the coordinates... know i only have a Image of a sat-bild and want to cut a region. The Image is available on: http://www.fennec.imperial.ac.uk/ There is a option to look on the coordinates by a click on…
S.Kociok
  • 168
  • 1
  • 14
-2
votes
1 answer

I have a function for plotting the map (python) . How can I plot the function output in different subplots?

Link to original function code I have modified this function given in the link as per my needs. But I am not able to assign the outputs from the function to different subplots. Is there any way to do it? x1 = fig.add_subplot(221) …
-2
votes
2 answers

How to plot points using m.scatter at certain longitudes and latitudes

Say I have an array of indices named indices like so: [[1, 34, 56] [2, 54, 34] [2, 89, 173] ... [6, 23, 13]] The first element is an arbitrary element. The second and third elements represent longitude and latitude respectively. How can I…
user8365869
1 2 3
82
83