I am using the LISA Cluster package from Pysal to create a LISA (Local Indicator of Spatial Autocorrelation) map.

As the example of the documentation shows, the color lightblue is used to identify regions classified as "Low-High"

enter image description here

The problem is that, when I generate a map, that does not have a region in each of the 4 categories (HH, HL, LH, LL) the color attributed to the existent categories is changed, creating a problem to compare different maps:

enter image description here

In the Figure above, there is no regions classified as HL, so the color orange was atributed to LH, instead of lightblue.

How can I fix the colors, so LH will always be lightblue and so the others?

  • I just tried with some plotting method and they are all dead ends, so I think you may wanna manually categorize them based on moran's I and the p-value and set the color you wanna.
    – steven
    Jul 26, 2019 at 1:03

1 Answer 1


I found the answer on a SO question. This was a known issue, solved in pysal 2.1.0 version. The problem is solved upgrading pysal.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.