All Questions
599 questions
0
votes
1
answer
25
views
Basemap plots in Matplotlib have cutoff map boundary lines
When trying to create a grid of maps in matplotlib using the Basemap toolkit, I noticed that the line that bounds the map projection is cut off on all four sides.
Look at the following minimal example ...
1
vote
1
answer
62
views
Python: Plotting a Basemap in the x-y-plane of a 3d plot
I am trying to get the code contained in
https://basemaptutorial.readthedocs.io/en/latest/basemap3d.html
to work. However, I get an error already in the first snippet:
import matplotlib.pyplot as plt
...
1
vote
2
answers
3k
views
How do you display the scale in meters, the north arrow and the axes in latitude and longitude on a map with Geopandas?
With reference to this issue, is it possible to have the scale bar (projected in meters, so 3857 for example) with the x,y axes in latitude, longitude projection (4326) and the north arrow?
I don't ...
24
votes
2
answers
50k
views
How to insert scale bar in a map in matplotlib
Any ideas on how can I insert a scale bar in a map in matplotlib that shows the length scale? something like the one I have attached.
Or maybe any ideas on measuring and showing distances ...
1
vote
0
answers
44
views
Basemap nightshade() on Robinson Projection and lon_0=-180
I'm attempting to plot day/night shading on a Robinson projection centered at -180 degrees with Basemap, and as you can see, the shading doesn't look right. I'm also getting a warning about a non-...
0
votes
1
answer
103
views
How to plot streamlines with netcdf data in python using cartopy or basemap?
I wanted to plot streamlines with NOAA from composite (2.5*2.5 lon/lat).
I tried to draw it with basemap (The codes are attached) but I face to this error: 'y' must be strictly increasing.
After that, ...
4
votes
2
answers
4k
views
Plotting a list of (lattitude, longitude, value)-tuples in Python?
I have a list of (latitude, logitude, value)-Tuples I want to show using Basmap. What's the easiest way to do that?
data = [(1, 2, 0.12323),
(2, 5, 0.23232),
(4, 52,0.23131)
.
...
0
votes
0
answers
81
views
Basemap Robinson Projection Map Border Cut Off on Left and Right Edges
I'm using Basemap to plot a global contour on a Robinson map projection, and I've noticed an aesthetic issue that has been bothering me. In every example I've come across using the Basemap Robinson ...
8
votes
2
answers
17k
views
How to set 0 to white at an uneven colormap
I have an uneven colormap and I want the 0 to be white. All negative colors have to be bluish and all positive colors have to be reddish.
My current attempt displays the 0 bluish and the 0.7 white.
Is ...
0
votes
0
answers
37
views
contourf, hatching not working on the last plot in a panel plot
Hatching don't work on the last plot in a panel plot.
The first and second plots are ploted fine, but the last plot doesn't work.
The "DJF_sig" variable is fine, I have attached a previously ...
4
votes
1
answer
220
views
How to overlap a geopandas dataframe with basemap?
I have a shapefile that I read as a geopandas dataframe
import geopandas as gpd
gdf = gpd.read_file('myfile.shp')
gdf.plot()
where gdf.crs
<Projected CRS: ESRI:54009>
Name: World_Mollweide
Axis ...
1
vote
1
answer
46
views
Basemap with joint histograms plot
Here is the code returning the figure below:
import seaborn as sns
plt.figure(figsize=(8, 8))
gs = plt.GridSpec(3, 3)
ax_main = plt.subplot(gs[1:3, :2])
ax_lon = plt.subplot(gs[0, :2])
ax_lat = plt....
16
votes
3
answers
84k
views
How to make grouper and axis the same length?
For my assignment I'm supposed to plot the tracks of 20 hurricanes on a map using matplotlib. However when I run my code I get the error: AssertionError:Grouper and axis must be the same length
Here'...
13
votes
5
answers
74k
views
How to install Matplotlib's basemap?
It is unclear to me how to install Matplotlib's Basemap on Windows. Maybe the question is straightforward, I need some help.
I followed this tutorial. As far as I understand, first, GEOS and PROJ4 ...
0
votes
1
answer
135
views
Plotting a grid in km with a center point in latitude and longitude onto a map
I want to plot a square grid of size 2km by 2km with the point (latitude, longitude) in degrees:
co_ord = (47.9187393, 106.9175013)
located at the center of the square grid.
I have tried:
import ...