I have a matrix (attached data) and the values in the matrix ranges from 0 to 2.2. I used the following scrip to create a contourf plot by giving the levels (0 to 2.5 at intervals of 0.5) and colors. This has produced the attached figure. My questions are follows
- When i set the levels and colors (as in the pasted mpl script below), contourf produced the attached figure using the discrete colors i specified for each intervals. The document for norm arguement under contouf says ‘instance for
scaling data values to colors’. What does this scaling exactly mean ?. I want to try this scaling but i dnt know how to include this in my script.
- How to use the set_over and set_under options for colorbar ?
test_data (110 KB)
import matplotlib.pyplot as plt
from sys import argv
import numpy as np