|
From: Mathew T. <mat...@ed...> - 2012-04-09 12:22:36
|
Dear matplotlib-users, I have a spatial data set that has coded values for each cell, which are limited to just a few numbers, ie -8888, 0, 100, and 9999. I would like to display this data with a plot similar to pcolor, but I don't want a colorbar, I want a legend showing the colors for each code and an explanation for what each code represents. I would like to be able to choose a subset of the codes as well, for example just plotting the 0 and 100 codes and ignoring the -8888 and 9999 codes. I have seen a few similar attempts that used BoundaryNorm, but I don't want to show a range of values I just want to set colors for a few explicit values. Those examples also had a colorbar and, as I said, I would prefer a legend. Can anyone offer any tips? Thanks Mat -- The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336. |