Skip to main content

All Questions

0 votes
1 answer
340 views

What is the Basemap equivalent of Matplotlib's "ax1.add_collection(mylinecollection)"?

I am pulling latitudes/longitudes from a relational database. The points are vertices of line segments, and the database table is organized such that the points can be grouped based on a line number ...
username's user avatar
1 vote
2 answers
3k views

How to add legend in Basemap with Python

I am trying to put a legend in my world map. Every point is a different kind of devices from a different tweet. Here is my code: import geocoder import json from mpl_toolkits.basemap import Basemap ...
La_haine's user avatar
  • 349
2 votes
0 answers
2k views

plot RGB using cartopy pcolormesh

I am trying to plot an RGB array over a map using irregular lat/lon array that are provided with the dataset. For this purpose I am using pcolormesh as discussed here. The problem is that cartopy ...
Monobakht's user avatar
  • 303
0 votes
0 answers
994 views

How to increase the width of subplots in Basemap?

I am having a problem with subplots when using Basemap. I am plotting relative humidity (RH) measured in six pressure levels by a satellite. In the first image (Figure 1) I have plotted RH measured ...
kirerik's user avatar
  • 187
1 vote
1 answer
964 views

Plotting data points onto matplotlib Basemap in Jupyter Notebook

Link to full code I am able to successfully create a Basemap of the US within a Jupyter Notebook complete with shapefile, coloring, and borders in Cell 4. I am trying to plot many data points onto ...
Alex's user avatar
  • 185
1 vote
1 answer
2k views

colormap plot doesn't show all values [duplicate]

I have a table which has month numbers as columns ( jan = 1, feb = 2... dec = 12) and a set of heights as indices and the data fills the columns for each month at each height. I am trying to plot a ...
Gandalf_3.1's user avatar
1 vote
1 answer
2k views

matplotlib Basemap legend corresponding to colour of points

I've made a basemap with locations of maximum wind speed plotted as green, yellow or red depending on the wind speed. I'm now trying to add a legend which has the three colours on but i get this ...
Matt's user avatar
  • 11
0 votes
0 answers
135 views

Drawing countour lines on a map Python 2

i am trying to draw contour lines on a world map, the lines represent the magnetic declination in a specific latitude and longitude. My current code is such: def frange(start, stop, step): x = start ...
Rbsann's user avatar
  • 1
3 votes
1 answer
2k views

How to color points base on other values in matplotlib?

I have some data that looks like this: (4,120,507.0),(6, 37, 7012.0),etc The first two is the coordinates, another is the values. I've drawn a scatter plot based on these coordinates. So how can I ...
dlwlrma's user avatar
  • 828
1 vote
1 answer
1k views

gridspec with subfigures that have fixed aspect ratio

I use mpl_toolkits.basemap (Basemap) which returns figures with fixed aspect ratios. I like to group a few plots from Basemap into one figure. The problem: Basemap in combination with gridspec ...
E.Eisbrenner's user avatar
2 votes
0 answers
288 views

Intersect several 2-d subplot in MatPlotlib

Familar with Matplotlib and Basemap, but I haven't noticed that some one has tried to plot intersected figure to visualize multi-dimension data. Here is an practical scene: Satellite data now can ...
Han Zhengzu's user avatar
  • 3,852
0 votes
1 answer
542 views

Setting plot border frame for two subplot containing MatPlotLib.Basemap contents

As an illustration, I present a figure here to depict my question. fig = plt.figure(figsize = (10,4)) ax1 = plt.subplot(121) map =Basemap(llcrnrlon=x_map1,llcrnrlat=y_map1,urcrnrlon=x_map2,...
Han Zhengzu's user avatar
  • 3,852
1 vote
0 answers
408 views

Change the canvas's shape when using Lambert Conformal Projection

With the supporting of matplotlib basemap, I can draw my netCDF files in different kind of projection type. We always see the figure is in rectangular showing like this: But I also see some ...
Han Zhengzu's user avatar
  • 3,852
1 vote
1 answer
959 views

Interpolation between two xarray datasets with Basemap

I have two different xarray datasets that have different latitude/longitude grid resolutions. I want to regrid the one xarray with lower resolution to the same resolution as the one xarray with higher ...
jetesdal's user avatar
  • 118
1 vote
1 answer
117 views

How to maintain the same color scale on Basemap?

I am drawing some maps of accumulated rain, but they have different color scale and such I can't compare the displayed maps. There is some way for to obtain the maps with same color scale. Below is my ...
Yordan A's user avatar

15 30 50 per page