Skip to main content
Filter by
Sorted by
Tagged with
0 votes
0 answers
83 views

rendering a map with netcdf information i have the image below but it's pixeled, is there a form to render a "smooth map" like the second image? #Variables netcdf file lons = ds.variables['...
sckull's user avatar
  • 33
0 votes
0 answers
479 views

I am trying to copy the method that was done on this page: https://makersportal.com/blog/2018/7/20/geographic-mapping-from-a-csv-file-using-python-and-basemap under "Mapping Interesting Data"...
Bryn's user avatar
  • 1
0 votes
1 answer
2k views

I've got some code similar to this from matplotlib import animation import matplotlib.pyplot as plt import numpy as np fig, ax = plt.subplots() def animate(i): x0,y0 = np.random.random(size=(2,))...
Ethan's user avatar
  • 544
1 vote
2 answers
1k views

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
4 votes
1 answer
2k views

I am using matplotlib's Basemap to plot points on a world map. I am extracting the latitude and longitude values from a two columns cordb['Latitude'] and cordb['Longitude'] in a CSV file. Also, the ...
Gun's user avatar
  • 586
0 votes
1 answer
62 views

I want to render an entire map and parts of North America using a netcdf file from European Centre for Medium-Range Weather Forecasts but only half of the map is shown. import netCDF4 as nc import ...
sckull's user avatar
  • 33
1 vote
1 answer
207 views

I have this code for a map using a netcdf file of European Centre for Medium-Range Weather Forecasts. def interactive_map(): import netCDF4 as nc import numpy as np import matplotlib....
sckull's user avatar
  • 33
0 votes
1 answer
549 views

I need to plot a shapefile in Python, which is supposed to be as simple as this: m = Basemap(...) m.readshapefile(path/filename,'.shp',...) However, the data I need is included in a GIS database ...
Roland's user avatar
  • 461
1 vote
1 answer
6k views

Hi when trying to import basemap I get this error ImportError: cannot import name 'dedent' from 'matplotlib.cbook' I've tried a lot of trouble shooting and can't figure it out. I am using windows and ...
Kevin Falk's user avatar
1 vote
1 answer
322 views

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
2 answers
3k views

I used this code to draw 2 latitude and longitude coordinates on the world map: from mpl_toolkits.basemap import Basemap import matplotlib.pyplot as plt m = Basemap(projection='robin', lon_0=0, ...
user avatar
0 votes
1 answer
334 views

I am trying to plot some grib data using basemap and imshow instead of contourf. When I plot it with contourf I get the proper boundaries and colours, but when I do it with imshow there is a mismatch ...
Carlos Peralta's user avatar
0 votes
1 answer
588 views

I'm running an example script for python basemap. Here is the script: import sys print("Running on = ", sys.executable) from mpl_toolkits.basemap import Basemap import numpy as np import ...
Angelo's user avatar
  • 97
0 votes
1 answer
330 views

When I try to plot data using Basemap from a Grib file, the map is not fitted to the data being plotted. I posted the code used below and and a link to the output image below that. I think the ...
w142236's user avatar
9 votes
4 answers
18k views

I'm trying to draw a network on a basemap overlay. I have packages: basemap=1.3.0=py36ha7665c8_0 matplotlib=3.3.1=0 matplotlib-base=3.3.1=py36hba9282a_0 networkx=2.5=py_0 When I run only the line ...
Jorrit G's user avatar
  • 649
0 votes
1 answer
2k views

I am trying to plot a .tif raster on my map with basemap. With QGIS I see the raster layer as it is supposed to be: QGIS image However, when then plotting with python basemap the colours are off, and ...
Elsri's user avatar
  • 61
1 vote
1 answer
468 views

I currently want to draw a sector-like wedge in Cartopy, so I look up the matplotlib.patches.Wedge method. It's almost the function I need, but the unit of the parameter radius it needs is in degrees, ...
Charlie Huang's user avatar
5 votes
2 answers
42k views

I am trying to plot some latitude and longitudes on the map of delhi which I am able to do by using a shape file in python3.8 using geopandas Here is the link for the shape file: https://drive.google....
gm1312's user avatar
  • 109
3 votes
0 answers
897 views

I have trouble importing the basemap module of mpl_toolkits in python. I've got following error message when I try to run "from mpl_toolkits.basemap import Basemap": Traceback (most recent ...
Pawan Gautam's user avatar
1 vote
1 answer
838 views

When using LinearSegmentedColormap, Matplotlib documentation mentions regarding the argument colors that colors: array-like of colors or array-like of (value, color). If only colors are given, they ...
Chao's user avatar
  • 99
1 vote
1 answer
1k views

I'm trying to draw a map with Basemap following this tutorial: https://ramiro.org/notebook/basemap-choropleth/ This part of the code throws an error ('DataFrame' object has no attribute 'ix'): if iso3 ...
Rose Miller's user avatar
2 votes
1 answer
517 views

Is it possible to have osmnx and basemap in the same environment? I've been trying to install it but had no luck. I need to plot some coordinates with basemap that I got from osmnx and connect them ...
Zinic's user avatar
  • 27
0 votes
1 answer
112 views

I have a problem on using basemap in python , obspy. I am using these commands: from mpl_toolkits.basemap import Basemap import numpy as np import matplotlib.pyplot as plt from obspy import ...
Ivan Roma's user avatar
0 votes
1 answer
4k views

in respect to the previous examples in stackoverflow, I searched for other alternatives in order to create a scalebar. In my research, I verified that the Basemap class from mpl_toolkits.basemap see ...
Philipe Riskalla Leal's user avatar
-1 votes
3 answers
791 views

I hope someone can help me with this. I am plotting netcdf data on a map using the mpl_toolkits.basemap and netCDF4.Dataset packages. They worked perfectly a few month ago and I successfully plotted ...
Gazorpazorpfield's user avatar
3 votes
1 answer
5k views

I need to obtain a colour map using interpolation of altitude records. I have a set of 34 points located along a region and in each point I have altitude record. I tried the code below, but it results ...
bruce_skywalker's user avatar
0 votes
0 answers
108 views

Hi I have a dataframe (Df) with lat/long and values lat lon utci 0 90.0 -180.00 242.923935 1 90.0 -179.75 242.923935 2 90.0 -179.50 242.923935 3 90.0 -179.25 242.923935 4 90.0 ...
Negin Nazarian's user avatar
0 votes
1 answer
3k views

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
1 answer
243 views

I am new to python programming. I have a csv file with over 1000 rows. I will like to plot the columns (latitude and longitude) based on the value of the column (peak current) on a map. I usually get ...
Stan's user avatar
  • 3
0 votes
1 answer
368 views

I am in trouble with how to plot the coordinate given in a file.csv using basemap. It has error when I run with latlon=True. My code below : import pandas as pd import matplotlib.pyplot as plt import ...
Nguyễn Đức Việt's user avatar
0 votes
2 answers
925 views

import matplotlib.image as mpimg import numpy as np import matplotlib.pyplot as plt import matplotlib.animation as animation from matplotlib.widgets import Button from matplotlib.widgets import Slider ...
mjasian's user avatar
  • 11
0 votes
0 answers
36 views

If anyone has any experience doing this, please let me know as I would greatly appreciate it.
mjasian's user avatar
  • 11
0 votes
0 answers
599 views

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
888 views

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
1 vote
1 answer
437 views

I am using matplotlib along with the basemap with the following code import matplotlib.pyplot as plt from mpl_toolkits.basemap import Basemap,cm #Map Center core = (151.35,-23.92) LAT = core[1] LON =...
azis511's user avatar
  • 23
0 votes
1 answer
1k views

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
1 vote
0 answers
326 views

I am using the following code to plot Basemap using matplotlib in python. import os os.environ['PROJ_LIB'] = r"C:\Users\Anaconda3\pkgs\proj4-6.0.0-ha7a8c7b_0\Library\share\proj"; from ...
RRSC's user avatar
  • 247
0 votes
0 answers
59 views

I am writing a python application using tkinter that plots weather data on a map. I am currently testing out my button that is supposed to plot the data on the map I created using basemap. However, ...
Benny's user avatar
  • 1
0 votes
0 answers
3k views

I am trying to make one figure for each of my GPS hiking route where I plot the track on a map, very likely the one from open street map. Extracting the data from the gpx file is not an issue and I ...
leonardo2887's user avatar
1 vote
1 answer
5k views

Is there a way to get a more detailed coastline than the default in Basemap? For example, if I try to show the coast of Norway, the default plot is very coarse and a bit ugly (see figure). Any way to ...
Zorglub29's user avatar
  • 9,399
0 votes
1 answer
97 views

How can I manage the tick for this horizontal histogram? My code: d1=pd.read_csv('Gold1.Dat') d1.dropna(subset=['WF (mV)'],how='any', inplace=True) binwidth=5 m_n=np.floor(min(d1['WF (mV)'])/binwidth)...
Prabesh Bista's user avatar
1 vote
0 answers
105 views

Why I am getting a runtime error while running this code?? I wanted to show two SST data in a single plot using for loop. while I am running the code it shows your system has crashed. I am sharing the ...
Joy's user avatar
  • 11
0 votes
1 answer
347 views

I would like to fill a polygon using basemap/shapefile data, but only a certain %. For example, in the example below, we fill based on the values, but let's say I wanted to fill a % of the polygon ...
Neviem's user avatar
  • 107
0 votes
1 answer
333 views

I need a Python environment with both basemap and geopandas, but installing one removes the other. Is there anyway to have both, or is there a reasonable way to switch between interpreters in the same ...
a11's user avatar
  • 3,476
0 votes
1 answer
2k views

I am trying to show the density of geographical points using Basemap and seaborn : f, ax = plt.subplots(1, figsize=(9, 9)) # plot coastlines with basemap m = Basemap(projection='cyl', resolution='c', ...
Mohamed Ait Ahmed's user avatar
2 votes
1 answer
687 views

I am trying to interpolate sparse data over a meshgrid, but am observing some rather odd behavior. The white dots are precisely where I have values, and I am relying on the linear interpolation ...
Houndbobsaw's user avatar
0 votes
1 answer
462 views

I would like to "download" (save in a pickle file) a basemap loaded in cartopy, so that I can re-plot on one of two axes in a matplotlib figure using a different script than the one I used to download ...
NaN's user avatar
  • 691
1 vote
0 answers
200 views

I am very new on python. I need to plot the CO2 map over European domain using netcdf files from daily global cams dataset. 1-I can plot global domain correctly without any interpolations. However, ...
frank's user avatar
  • 91
1 vote
0 answers
428 views

I'am getting this error(TypeError: Dimensions of C (24, 4) are incompatible with X (24) and/or Y (24); see help(pcolor)),at the line for pcolormesh, any idea how to handle this. Script: import numpy ...
Bachi's user avatar
  • 133
6 votes
2 answers
83k views

Iam getting an IndexError: arrays used as indices must be of integer (or boolean) type at the line for pcolormesh, any idea how to handle this. script: import numpy as np import matplotlib.pyplot ...
Bachi's user avatar
  • 133

1 2 3
4
5
25