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')
Related
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.
Consider a Manhattan plot for a genome-wide association study. The density of dots at the bottom of the plot is very high -- individual points are no longer visible. I'd like to skip plotting the points that completely overlap with other points (even though their x,y is not identical) to reduce the plotting time and the size of the exported PDF. Any recipes for achieving this? Collision detection? Subsampling?
I'd like to use matplotlib, though this requirement is optional. Ideally, the output should be visually identical to the "full" plot.
Some background info on the plot type:
https://en.wikipedia.org/wiki/Manhattan_plot
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 a standard 3D python plot, each data point is, by default, represented as a sphere in 3D. For the data I'm plotting, the z-axis is very sensitive, while the x and y axes are very general, so is there a way to make each point on the scatter plot spread out over the x and y direction as it normally would with, for example, s=500, but not spread at all along the z-axis? Ideally this would look like a set of stacked discs, rather than overlapping spheres.
Any ideas? I'm relatively new to python and I don't know if there's a way to make custom data points like this with a scatter plot.
I actually was able to do this using the matplotlib.patches library, creating a patch for every data point, and then making it whatever shape I wanted with the help of mpl_toolkits.mplot3d.art3d.
You might look for something called "jittering". Take a look at
Matplotlib: avoiding overlapping datapoints in a "scatter/dot/beeswarm" plot
It works by adding random noise to your data.
Another way might be to reduce the variance of the data on your z-axis (e.g. applying a log-function) or adjusting the scale. You could do that with ax.set_zscale("log"). It is documented here http://matplotlib.org/mpl_toolkits/mplot3d/api.html#mpl_toolkits.mplot3d.axes3d.Axes3D.set_zscale
for a while I've been trying to come up with a good way to graphically represent a data series along with its estimated error.
Recently I saw some graphs where the data was plotted as a line, with a background 'ribbon' filling the area between the lines plotting data +/- sigma.
Is there a name for this type of graph, and is there any python toolkit which has the capability to make such plots?
A simple way to fake it with matplotlib would also be useful - right now I'm just plotting three lines, but I don't know how to fill the area between them.
I would use the fill_between method. Look at the Our Favorite Recipes section of the manual for matplotlib for some good examples. They have one that looks like this:
and another that looks like this: