{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "\n# Colouring Anomaly Data With Logarithmic Scaling\n\nIn this example, we need to plot anomaly data where the values have a\n\"logarithmic\" significance -- i.e. we want to give approximately equal ranges\nof colour between data values of, say, 1 and 10 as between 10 and 100.\n\nAs the data range also contains zero, that obviously does not suit a simple\nlogarithmic interpretation. However, values of less than a certain absolute\nmagnitude may be considered \"not significant\", so we put these into a separate\n\"zero band\" which is plotted in white.\n\nTo do this, we create a custom value mapping function (normalization) using\nthe matplotlib Norm class :obj:`matplotlib.colors.SymLogNorm`.\nWe use this to make a cell-filled pseudocolor plot with a colorbar.\n\n
By \"pseudocolour\", we mean that each data point is drawn as a \"cell\"\n region on the plot, coloured according to its data value.\n This is provided in Iris by the functions :meth:`iris.plot.pcolor` and\n :meth:`iris.plot.pcolormesh`, which call the underlying matplotlib\n functions of the same names (i.e., :obj:`matplotlib.pyplot.pcolor`\n and :obj:`matplotlib.pyplot.pcolormesh`).\n See also: https://en.wikipedia.org/wiki/False_color#Pseudocolor.