Skip to main content

Questions tagged [matplotlib]

If you are thinking about using this tag then perhaps reconsider whether your question would be better posted to Stack Overflow because "matplotlib is a python 2D plotting library" rather than GIS software.

0 votes
0 answers
37 views

QNEAT3 Iso-Areas tools error

I'm trying to create isochrone maps in QGIS 3.24.3 for Windows using the QNEAT3 plug-in but with no success. The program starts running but stops eventually with the following error message: File &...
Pedro's user avatar
  • 1
3 votes
1 answer
121 views

Creating 3D terrain from 30m DEM using Python

I'm trying to create a 3D terrain surface from a DEM (GeoTIFF) file using Python, in order to visualize clustering results of observation points on top of it. I successfully extracted the elevation ...
DSK's user avatar
  • 51
0 votes
1 answer
117 views

When plotting make image fill entire page in GeoPandas

I would like to create a square (1:1 aspect ratio) image map, but as you can see plotting under GeoPandas the map does not fill the page. How can I correct this? (I am using geopandas with contextily ...
Steven Buehler's user avatar
0 votes
0 answers
125 views

GeoPandas plot method does not work without pyplot.show method

Running Python 3.12 Anaconda distribution, with GeoPandas v 1.0 installed. Both Matplotlib and GeoPandas are installed and imported without error (e.g., import matplotlib.pyplot as plt). In both ...
Nicholas Lombardi's user avatar
0 votes
1 answer
97 views

True comparison of country sizes when plotting GeoDataFrame of countries with matplotlib

When plotting subplots of different countries, the axis ratios are not the same among subplots, showing the countries with incorrect sizes. Kenya is much bigger than the others but shows as big as the ...
Ignacio's user avatar
1 vote
1 answer
71 views

Trigger Python code with "Navigate to next feature" button on QGIS

I am creating a script in the Action feature of QGIS that plots the values of an attributed table in matplotlib when I click on a feature in a layer as shown below. class ClickTool(QgsMapToolIdentify):...
AMA's user avatar
  • 476
1 vote
1 answer
1k views

How do I insert labels or annotate the points in a plot with multiple things?

I'm trying to make a simple study area map which consists of basin boundary shapefile, sampling points and river shapefile. Here's the dataframe of the sampling points: And here's the code to plot ...
mfirdaus_96's user avatar
3 votes
1 answer
2k views

Labelling a Map

I have a map I have made using python, matplotlib, cartopy and shapely. It has a coast, county borders, lakes and rivers. I also shade in districts, in the form of polygons, on the map in order to ...
Baz's user avatar
  • 85
1 vote
1 answer
1k views

Setting the background color when plotting in GeoPandas

I am wondering if there is an easy way in GeoPandas to change the background color of a plotted map. Here is my code; I can't figure out how to change the white background color to any other color. ...
sBoroushaki's user avatar
1 vote
1 answer
152 views

Barplot with a basemap as a background

I have some data as a pandas DataFrame with values associated with longitude. I have plotted it as stacked bars like this: A subset of the data as an example via df.to_dict(): {'Commodity driven ...
Jan Pisl's user avatar
  • 768
1 vote
0 answers
148 views

Plot raster in synusoidal projection in python

I want to plot data in a matrix, with two other matrices with coordinates, with a sinusoidal projection, in Python. I read data and coordinates from HDF5 or NetCDF files in the form of numpy arrays. ...
Ferny's user avatar
  • 21
0 votes
1 answer
471 views

Adding polygon geometry to numpy array to plot it with background

I'm trying to plot image I treated in dataframes. I need to add geometry to it in order to plot it with a background. I should have used GeoPandas and geodataframes in the first place. I have arrays ...
sam's user avatar
  • 33
1 vote
0 answers
160 views

Control the range with show_hist of rasterio

When I set up the "range" argument, Running this code will have an Error. Would help me with how to set up the range ? from rasterio.plot import show_hist a =src.read(1) show_hist(a, bins=...
This_is_my_first_day's user avatar
0 votes
1 answer
144 views

Estimated Min Max values of ERA5 data

I am working with u and v component of wind on earth engine (ERA5) dataset hourly aggregates as well as directly fetching data from ERA5. 1) What I don't understand is why are u and v component values ...
pwnkit's user avatar
  • 17
0 votes
1 answer
954 views

Saving plot from .nc file without showing the plot

I am trying to save the sequence of plots of 24 hours of ERA5 data from .nc file without plotting them. I am using xarray for reading .nc data. Here is my code: import xarray as xr import matplotlib....
pwnkit's user avatar
  • 17

15 30 50 per page
1
2 3 4 5
15