All Questions
Tagged with matplotlib-basemap python-3.x
124 questions
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] ...
0
votes
0
answers
103
views
Python: Adding a zoom variable for matplotlib map
I'm trying to add a zoom variable to the following code to increase / decrease the zoom (scale) of the map this code produces:
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
...
0
votes
1
answer
129
views
MPL Basemap Projections not showing output properly
So I have this old code from my teacher that plots a Mollweide Projection using Basemap
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.basemap import Basemap
from itertools ...
0
votes
1
answer
2k
views
NotImplementedError: Axes3D currently only supports the aspect argument 'auto'. You passed in 'equal'
I was following this tutorial
I tried to run these codes:
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
from mpl_toolkits.basemap import Basemap
map = Basemap()
fig = plt....
0
votes
0
answers
904
views
How to give administrative privileges when installing CMake
I am using the instructions from https://github.com/matplotlib/basemap to install Basemap on my macOS Monterey, Python3.9
I have installed all prerequisites but in step 3:
"Build the GEOS library....
1
vote
1
answer
749
views
How can I annotate text in Basemap using the exact coordinates of the location in Python?
I have created a Basemap of Asia using following lines of code. The projection used is "marcator". The region I want to show in this basemap is Chitwan, Nepal. The coordinates is also ...
0
votes
0
answers
428
views
Installing Basemap in virtualenv
I am using Python 3.6.9 and in a virtual environment and I am trying to install basemap, with no luck.
I have read over and over the installing guidelines and other sources. But the basemap file is ...
1
vote
1
answer
376
views
Matplotlib Annotations disappear during animation when updating xlim
I am having an issue with FuncAnimation where my annotations are removed after updating xlim. Here is the code with a preview underneath
You can try the code in a google colab here https://colab....
1
vote
1
answer
361
views
How can I change the python matplotlib.pyplot legend marker into a serial number like 1,2,3 instead of shape or character?
import matplotlib.pyplot
plt.figure()
plt.plot(x, 'r+', label='one')
plt.plot(x1, 'go--', label ='two')
plt.plot(y, 'ro', label='Three')
plt.legend()
In the above code legend marker is 'r+' , 'go--'...
2
votes
0
answers
934
views
how to change specific value's color in pcolormesh, such as -1,-2,-3, not NaN
I know there is a func cmap.set_bad to change NaN's color but I want to change color of more values such as -1,-2,-3, how to do it?
this plot is base on basemap
and I want to hold the color of the ...
1
vote
0
answers
402
views
How to plot Large dataset using matplotlib bar graph
My sql query returning me 141 rows and two columns and i want to plot them in a horizontal bar graph. While doing so the data's are overlapping each other. How i can make the graph crisp and clear.
On ...
0
votes
1
answer
2k
views
Calculate netcdf files' variables correlation and plot on the map with Python
Given two nc files here:
data/CMIP6_UKESM1-0-LL_Lmon_piControl_r1i1p1f2_gpp_1960-3059.nc
data/CMIP6_UKESM1-0-LL_Amon_piControl_r1i1p1f2_tas_1960-3059.nc
Read the first file:
from netCDF4 import ...
1
vote
0
answers
87
views
scatter plot coordinate data using Basemap, Python,
I am a new python user and I need to plot the locations of satellite date of water vapor by using the Basemap (to just indicate where the data are available over the map, not plotting the value).
The ...
1
vote
0
answers
424
views
Making transparent maps for some projections in matplotlib basemap
I recently started using matplotlib's basemap. I want to create a transparent map with only borders, and this can be done with some basic projections like the miller projection in very simple code:
...
1
vote
2
answers
1k
views
Add world street map to basemap
I am having problems with basemap - arcgisimage function. Sample code below
...
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
from PIL import Image
m = Basemap(
...