I am using python basemap to draw the coastline around the United States the the Great Lakes. When I increase the resolution of the map drawn to 'i' for intermediate, it draws lots of small water features. Is there a way to only draw the coastlines around the oceans and great lakes, and not all small water features?
I have this...
But I want this... No small lakes, but want the coastline and states drawn at higher resolution.
Awh, figured it out...When creating the map you can specify the "area_thresh" so set that to a large number and it wont outline the small lakes. See Basemap documentation here.
m = Basemap(resolution='i',area_thresh=10000.,projection='lcc',\
lat_0=38.5,lon_0=-97.5,lat_1=38.5,\ lat_2=38.5,\
llcrnrlon=bot_left_lon,llcrnrlat=bot_left_lat,\
urcrnrlon=top_right_lon,urcrnrlat=top_right_lat,)
Related
I am looking for a way to easily plot a world map with a higher resolution compared to the built in resolution of Geopandas. To my knowing the built in dataset for a world map is only in low resolution:
import geopandas
world = geopandas.read_file(geopandas.datasets.get_path('naturalearth_lowres'))
world.plot()
plt.show()
I already read this page but couldn't find an answer: https://geopandas.org/en/stable/docs/user_guide/mapping.html#
I am not looking for google maps precision, but I would appreciate a map where if I zoom in, Belgium for example is plotted by a polygon which has a bit more than 14 points (see screenshot). (Let's say 100 to 1000 points.)
(I need the full map of the world as I am plotting data in different countries and would like to zoom in.)
That's a limitation of the data that built-in polygons have. Vectors represent the map as it is, regardless of zooming in on the map.
As the number of points that make up a polygon increases, a more precise map requires more capacity.
You will be able to use a variety of sources.
https://gis.stackexchange.com/questions/182944/seeking-polygon-shapefile-of-countries-states-and-islands
The sites listed in the answers above will help.
Get and load world borders from OSM or GADM. I haven't checked the size of the data, but the closer the boundaries are to reality, the larger the size of the data and the memory requirements to load the file.
Hi,
I am interested in drawing a figure, in R or python, resembling the attached image, where the largest sphere represents the total and each of the smaller spheres represent a certain percentage of the total?
Research in perception suggests that percentages of a whole are probably most effectively visualised with stacked bar charts - the cartesian counterpart of pie charts. If your data has a hierarchy as well, then I agree with neilsfw in using a treemap.
My particular case is that I am trying to make a 3D space-time diagram of a 2D cellular automata. If anybody has any advice/clever ways of representing this visually that would be awesome, but to make the question more general I'll phrase it as...
What is the best way to plot a sort of 3D chessboard or Swiss Cheese type pattern where the white squares are transparent (or vice versa)?
I have looked around and have found ways to plot Imshow type plots on a 3D coordinate system, but it was kind of clunky, slow, and I couldn't get the transparency to work (didn't try masks, but it didn't seem like what I wanted, but I could be wrong).
I have also used a scatter plot where I have a point at (x,y,z) if cell (x,y) is in the active state at time z (also tried the other way around...). This actually managed to render and looked pretty cool, but for the wrong reasons since it was hard to see anything on and was hard to angle properly due to the amount of points on the scatter plots making it lag.
Thanks in advance for any advice.
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 capture the information of atmosphere in 3-d dimension which contain the spatial distribution in several vertical level.
The example figure here contain several subplots:
(1) Vertical profile of dust extinction coefficient from calipso satellite data. (2) The average profile for each slice of (1)
(3) The background figure represent the ground-level wind field of East Asia.
(4) Some purple streamline(look carefully) which pass through each slice represent the air mass trajectory.
The figure here represent essential information in one frame.
The Matplotlib and Basemap can help me to generate each subplot. Is there any useful tools or python package can organize all these elements into one.
In Atmospheric Research, the cross-section plots are often used to represent the average meteorology vertical profiles.
Using Python, I can plot the cross-section figure based on netcdf file(Simulation result).
I use this post for reference
But how to represent the terrain in specific cutting line. Example like this:
I've used
plt.fill_between(axis, terrain, 0, facecolor='black')