As a companion script to this one on UK monthly temperatures the Met Office's data on rainfall can be compared in a similar way. The script below produces "raincloud" plots of the monthly rainfall since 1891 for two regions of the UK: East Anglia (relatively …
The UK Meteorological Office offers historical data of mean monthly temperatures in different regions of the UK for download. For the purposes of this blog post, I downloaded the data corresponding to two regions: Scotland.txt and South_England.txt. There are different ways of analysing these data …
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 …