A raincloud plot draws a distribution as a cloud, its kernel density estimate, above the rain of the samples from which it is estimated. This post uses raincloud plots to compare the monthly numbers of rain days (days with at least 1 mm of precipitation) …
A ridgeline plot is a set of distributions, one for each of a series of categories, drawn one above another so that they partly overlap, like a mountain range seen in profile. This post introduces kernel density estimation and uses it to draw ridgeline plots …
As a short addendum to this blog post, the code below plots a chart of the nuclides showing four types of isoline: isotopes: these are nuclides with the same proton number, (and hence nuclear charge) – vertical lines in the chart. isotones: nuclides with the …
Just a quick demonstration of using Matplotlib and Pillow to customize a chart in the style of a 1950s academic journal article. The default Matplotlib styles are pleasing enough (here the scatter plot is of data taken from the file ac-ratings-gr.csv). Some 1950s academic journal …
Just a quick experiment in creating animated surfaces in Matplotlib. The distortions to the plane are sine waves applied in octaves with a random phase, : where is the amplitude (decreasing with increasing frequency) and is the frequency of the th wave. The animation is …
A quick project inspired by this tweet by @story645 referencing Jacques Bertin's Semiology of Graphics. The function plotted is the sum of a random selection of two-dimensional Gaussian functions, with filled and line contours indicated using Matplotlib's contourf and contour methods. They are animated by …
The equation for the temperature-dependence of the diffusion of hydrogen in tungsten may be written in Arrhenius form: where the temperature, , and activation energy, , are expressed in eV and the pre-exponential Arrhenius parameter, , and rate constant, , take units of . From …
Sometimes it is necessary to rotate a text annotation in a Matplotlib figure so that it is aligned with a line plotted on the figure Axes. Axes.annotation takes an argument, rotation, to allow a text label to be rotated, and a naive implementation might be …
Using AxesGrid Matplotlib has included the AxesGrid toolkit since v0.99. One of the useful things this allows you to do is include "inset" figures which are often used to show greater detail of a region of the enclosing plot, as in this example (the graph …
The multivariate Gaussian distribution of an -dimensional vector may be written where is the -dimensional mean vector and is the covariance matrix. To visualize the magnitude of as a function of all the dimensions requires a plot in dimensions, so visualizing this distribution for is …