Skip to main content

All 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] ...
Yotam Ben Saadon's user avatar
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 ...
Maverick's user avatar
  • 799
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 ...
hbstha123's user avatar
  • 1,730
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 ...
marcos's user avatar
  • 123
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....
Javier Salas's user avatar
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 ...
misaka17705's user avatar
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 ...
Cris_new's user avatar
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 ...
bah's user avatar
  • 21
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( ...
Peter3103's user avatar
1 vote
1 answer
309 views

Multiple color matplotlib markers

I'm trying to create a timeline of events where some of the events are effected by other events in the timeline, I want to use solid and multiple color markers so I could know which event was effected ...
Alon Moradov's user avatar
0 votes
1 answer
2k views

No module named 'mpl_toolkits.basemap'

When I run this code: from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt map = Basemap() plt.show() It gives me an error: ModuleNotFoundError: No module named 'mpl_toolkits....
AlarmClockMan's user avatar
0 votes
0 answers
592 views

Matplotlib ModuleNotFoundError: No module named 'mpl_toolkits.basemap'

I was trying to create a plot of a map with matplotlib, and I tried to run this code: from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt map = Basemap() plt.show() but I get ...
AlarmClockMan's user avatar
0 votes
2 answers
869 views

How to plot data on a basemap using matplotlib basemap

Two sections of my code are giving me trouble, I am trying to get the basemap created in this first section here: #Basemap epsg = 6060; width = 2000.e3; height = 2000.e3 #epsg 3413. 6062 m=Basemap(...
Christian_T's user avatar
0 votes
1 answer
1k views

Is there a way to get matplotlib's Basemap using North Polar Stereographic Projection to plot a range of lat/lons that doesn't include the pole?

Currently, the plot gives me this: Using: from mpl_toolkits.basemap import Basemap import numpy as np import matplotlib.pyplot as plt # setup north polar stereographic basemap. # The longitude lon_0 ...
Christian_T's user avatar
2 votes
1 answer
4k views

how to plot the track of cyclone with marker colors according to intensity

I am trying to plot a track of a cyclone over a base map. I am successful in plotting it with markers of the same color what I want is to plot the markers according to the intensity change. I will ...
Debashis Paul's user avatar

15 30 50 per page