Skip to main content

Analytical corner plot for Gaussian distributions

Project description


This code produces a corner plot for analytical multi-dimensional Gaussian distribution, using covariance matrix and mean matrix. It also allows us to plot another distribution, with reduced dimensionality, on top. I.e. a distribution for a case where we fixed one variable.

See for examples.


Option 1:

  • pip install normal_corner

Option 2:

  • python install in cloned directory


The main component is function normal_corner inside a normal_corner package. Below is a description of inputs and outputs.


  • Matplotlib figure object with a corner plot

Main input:

  • covm : covariance matrix, numpy array, NxN.
  • mean : mean matrix, numpy array, 1xN.
  • varlabels : labels for plotting, 1xN, list of str in LaTex format, between ($$).

Input for a second distribution on top:

  • fixedvarindex : index of variable that we do not use (fix), int, starting from 0. If not None, covm2 and mean2 must not be None.
  • fixedvarvalue : value of fixed variable, float. Leave None not to plot fixed value.
  • newcov and newmean : new covariance and mean matrices, same format, as above.

Optional input:

  • scale_factor : scale factor for plotting area, float, in sigma.
  • diagnostic : an option to print out some diagnostic messages, bool.
  • color : color for a main Normal distribution, str.
  • color2 : color for a secondary Normal distribution, with reduced dimensionality, str.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for normal-corner, version 0.0.1
Filename, size File type Python version Upload date Hashes
Filename, size normal_corner-0.0.1-py3-none-any.whl (5.0 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size normal_corner-0.0.1.tar.gz (3.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page