Skip to main content

All Questions

200 questions with no upvoted or accepted answers
7 votes
0 answers
1k views

How to speed up a Python Basemap choropleth animation

Taking ideas from various sources, and combining with my own, I sought to create an animated maps showing the shading of countries based on some value in my data. The basic process is this: Run DB ...
Bat Masterson's user avatar
5 votes
0 answers
2k views

The different result when I set `vmin` and `vmax` with different plot type

Background For plotting 2-d spatial distribution of some attribute, contourf and pcolormesh are both good choice as a visualization form. Due to the actual meaning of the plotting data, I want to ...
Han Zhengzu's user avatar
  • 3,852
5 votes
0 answers
330 views

BufferRegion is cleared by a call to clf()

I have an application in which I'd like to draw counties from a shapefile using Basemap. Drawing the county polygons is the bottleneck in the rendering, and since I'll be drawing the same region of ...
Tim Supinie's user avatar
  • 1,072
4 votes
2 answers
1k views

image on top of basemap continent

I am trying to add an image "stamp" on top of a weather plot, but the image is below other data. Is there a way to force the image to be on top of other plot data (like filled contintents, and ...
Conor Sweeney's user avatar
4 votes
0 answers
1k views

Plotting a map with matplotlib basemap - horribly slow

Plotting a very, very simple map of only europe in matplotlib / basemap takes so much time (around 10 seconds!). This is just unreal!? Setting of resolution is only "l" (low). Here is the very ...
mcatis's user avatar
  • 1,276
4 votes
1 answer
485 views

Segmentation Fault from basemap.Basemap

I have installed basemap using conda install basemap I can import using import mpl_toolkits.basemap as bm but calling bm.Basemap(projection='robin',lon_0=0.0,lat_0=0.0) or any other projection, I ...
Chuck A's user avatar
  • 41
4 votes
1 answer
2k views

Plotting a map : Rotating arrows for ocean surface currents

Here are the variables displayed by the netCDF file: I have written this code in order to draw Mediterranean surface currents with a netCDF file : import netCDF4 from netCDF4 import Dataset import ...
piecess's user avatar
  • 187
4 votes
0 answers
4k views

python and Basemap and remove Mexico/Canada from view

I am using Basemap within Matplotlib to draw a map of the United States. However, I cannot seem to be able to remove Mexico or Canada to just have the US shown. I need to draw the states as well. ...
mcfly's user avatar
  • 1,151
3 votes
0 answers
854 views

Rotating cartopy map by 90 degrees

I'm trying to create a map using cartopy, but have that map be rotated 90 degrees (see image below for a rough sketch of what I'm trying to do*). which was produced using the following code: import ...
ks905383's user avatar
  • 180
3 votes
0 answers
3k views

ProjError: x, y, z, and time must be same size

How can I fix *ProjError: x, y, z, and time must be same size+ error? I was loading an .nc-file and view dataset. lat, lon are of data exchanging Basemap type. But the error message call three ...
bigdata's user avatar
  • 31
3 votes
0 answers
1k views

Python : Basemap barbs , wind vector plotting on map

I'm trying to plotting wind vector on map using basemap.barbs. I try to draw it as a test with simple code. No error message is shown with this code, Even if I wait, the picture does not come out.. ...
Taegyu  Noh's user avatar
3 votes
0 answers
907 views

Matplotlib: how can I adjust the figure size to be tight around subplots with **fixed** aspect ratios?

I often make series of subplots with mpl_toolkits.basemap.Basemap projections, which generates geographic projections on axes with fixed aspect ratios. When I use fig.tight_layout(), this adjusts only ...
Luke Davis's user avatar
  • 2,686
3 votes
0 answers
359 views

How do you include mpl_toolkits in a Python PEX file

I'd like to create a PEX file from a script that I've written that imports mpl_toolkits.basemap. I've tried a number of things, including downloading the basemap .tar.gz, untarring it, and placing it ...
cjohnson318's user avatar
  • 3,263
3 votes
1 answer
756 views

removing null values from dbf file for error in Matplotlib Basemap when reading shapefile

So I am trying to read a shapefile in python for display in matplotlib basemap. I keep getting an error ValueError: invalid literal for int() with base 10: '*' From what I have read, it seems that ...
krishnab's user avatar
  • 10.1k
2 votes
0 answers
181 views

Ticks not visible on matplotlib subplots

I'm trying to get ticks to show up on matplotlib subplots but nothing seems to be working. I've tried using ax.xaxis.set_tick_params(labelbottom = True), ax.yaxis.set_tick_params(labelleft = True, ax....
mpletch1's user avatar

15 30 50 per page
1
2 3 4 5
14