All Questions
35 questions
14
votes
3
answers
13k
views
Why do I get "UserWarning: Module dap was already imported from None ..."
I have python-matplotlib and python-mpltoolkits.basemap installed from Ubuntu packages. Installing python-mpltoolkits.basemap also installs python-dap as a dependency.
When I import basemap, I get ...
13
votes
4
answers
11k
views
Python Basemap Import error: "requirement already satisfied" [duplicate]
What works is
import mpl_toolkits
What not works is (Import Error basemap not found)
from mpl_toolkits.basemap import Basemap
I followed the instructions here :
http://matplotlib.org/basemap/users/...
4
votes
2
answers
13k
views
plot trajectories on an map using basemap
import numpy as np
data = np.loadtxt('path-tracks.csv',dtype=np.str,delimiter=',',skiprows=1)
print data
[['19.70' '-95.20' '2/5/04 6:45 AM' '1' '-38' 'CCM']
['19.70' '-94.70' '2/5/04 7:45 AM' '1' '-...
4
votes
1
answer
4k
views
Basemap and density plots
I would like to create a density plot using basemap. The data I have is ungridded and repeating or very close to each other. I've tried gridding the data and then plotting the number of bins using ...
3
votes
1
answer
2k
views
How to color points base on other values in matplotlib?
I have some data that looks like this: (4,120,507.0),(6, 37, 7012.0),etc
The first two is the coordinates, another is the values. I've drawn a scatter plot based on these coordinates.
So how can I ...
2
votes
1
answer
2k
views
Reduce the Size of Matplotlib Basemap
In various operational and manually-run Python scripts, I produce thousands of plots of California every day using matplotlib's Basemap:
mp = Basemap(width=1284000,height=1164000,projection='lcc',...
2
votes
1
answer
2k
views
Plotting at boundaries using matplotlib-basemap
I have difficulties in plotting e.g. polygons across the boundaries of a map generated using matplotlib-basemap. In the example below, the map boundary is specified by the dateline. I try to plot a ...
2
votes
2
answers
3k
views
mlab.griddata bug?
I'm using mlab.griddata to interpolate some data when I encountered a strange and what looks like floating point precision bug. This is calling sequence:
nvals = matplotlib.mlab.griddata(lon_old....
2
votes
0
answers
2k
views
plot RGB using cartopy pcolormesh
I am trying to plot an RGB array over a map using irregular lat/lon array that are provided with the dataset. For this purpose I am using pcolormesh as discussed here.
The problem is that cartopy ...
2
votes
0
answers
288
views
Intersect several 2-d subplot in MatPlotlib
Familar with Matplotlib and Basemap, but I haven't noticed that some one has tried to plot intersected figure to visualize multi-dimension data.
Here is an practical scene: Satellite data now can ...
2
votes
0
answers
436
views
matplotlib: why inconsistent results between contour and contourf
Why would matplotlib's contour and contourf produce inconsistent results?
I have some data that I wish to plot on a map using the matplotlib basemap toolkit's stereographic projection. When I plot ...
2
votes
1
answer
889
views
Matplotlib Basemap Installation Troubles on OS X Yosemite
I've been having very serious issues installing Basemap from mpl_toolkits. Fortunately, it looks like I'm not the only one having these issues... I was wondering if someone could help me here.
I'm ...
2
votes
0
answers
581
views
Basemap Change color of neighbour countries
from mpl_toolkits.basemap import Basemap
fig = plt.figure(figsize=(20,10)) # predefined figure size, change to your liking.
# But doesn't matter if you save to any vector graphics format though (e....
2
votes
2
answers
1k
views
basemap plot only region of interest, not entire globe
I need to use a mollweide projection but plot only a region of interest. (eg lat=[10,90], lon=[-25, 45]). Basic code below.
It seems this does not possible with some projections in Basemap
(http://...
1
vote
1
answer
2k
views
matplotlib Basemap legend corresponding to colour of points
I've made a basemap with locations of maximum wind speed plotted as green, yellow or red depending on the wind speed. I'm now trying to add a legend which has the three colours on but i get this ...