1,251 questions
0
votes
1
answer
24
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 ...
0
votes
0
answers
23
views
How to plot streamlines from west to east with netcdf data in python
I wanted to plot streamlines with NOAA composite (2.5*2.5 lon/lat) from 30 west to 10 east ( I definitely want the map to be from west to east(. I tried to draw it with basemap (The codes are attached)...
1
vote
1
answer
61
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
0
answers
43
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, ...
0
votes
0
answers
80
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 ...
0
votes
0
answers
46
views
Maps used as context using contextily doesn't match with basemap
Both sources use the the same WGS84 Web Mercator projection, but the maps doesn't match:
import contextily as cx
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
# Map source
...
1
vote
1
answer
209
views
Python netcdf EOF analysis
I am performing a EOF analysis for JJAS NDVI.
from netCDF4 import Dataset
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import xarray as xr
import matplotlib as mpl
import ...
1
vote
1
answer
54
views
Python NetCDF Prime Meridian Line blank [duplicate]
I am trying to draw climatology map of GPCC precipitation.
But I found out there is a blank (data cut) in Prime Meridian Line.
How can I fix the problem? I can use CDO, NCO, Python.
I also share the ...
0
votes
0
answers
21
views
Country borders are shifted in relation to fillings - Basemap python
I am trying to do a colored map on python using BaseMap with a Shapefile but I have small shifts between borders and countries. Anyone would happen to know how I can fix this ? I would like to color ...
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 ...
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 ...
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....
0
votes
1
answer
490
views
How to use matplotlib.pyplot.contourf to plot a density array
I have an xarray Dataset called dens that I would like to plot.
This is the Dataset:
<xarray.Dataset>
Dimensions: (time: 641, lat: 30, lon: 30)
Coordinates:
* time (time) datetime64[ns] ...