I have plotted the following map of Philippines according to the population in its regions, using matplotlib.pyplot
in Python 3:
As can be seen, there's one province (in red) that is an outlier. When looking at the data, it is clear:
population = [16.892118644067804,
27.13259740259741,
27.325479452054793,
25.502352941176472,
29.62087999999999,
25.593870967741932,
27.649384615384616,
25.38908450704225,
26.924931506849322,
26.636250000000004,
27.317105263157895,
26.58338345864662,
29.48689393939393,
28.283986013986016,
26.563118279569903,
23.037142857142857,
24.2674]
This is making the plot "unattractive" - there would have been a lot more contrasting colors for the other regions had this one region's data not been an outlier. What options do I have to rectify this?
- Remove this region's data. In that case, this region would appear white (uncolored), and the rest will have contrasting colors. But for whatever reason, that's not an option for me currently.
- Manually tweak that one data point to "blend in" with the other data points (something like a mean of all the other data points, or even a handcrafted value that is reasonably close to the other data points, like 22, or whatever). I tried this, and this does give more contrasting colors. The trouble is, this is misrepresentation of data. So, if possible, I would like to avoid it.
- Stretch the yellow further down in the colormap, so that only a little space is given to red. That is, instead of the 2 colors starting to transition from one to the other around 24 in the colorbar, it should do so around, say, 19. Anybody knows how to do that?
Any other ideas? What are some of the best practice approaches to tackle this issue?