I am working on a map of mortality rates for several racial/ethnic groups and I have created custom classes to encompass the rates instead of the QGIS classes created through its various modes. This is to create a standard set of groupings and to minimize confusion created by different ranges being given similar coloring schemes across groups.

The problem I am having lies in the fact that some groups are not represented in all the classes. For instance, a range from 0 to 1200 with classes of 300 (0-300, 300-600, and so on). One group never goes above 600 while another group never falls below that level. And the print composer, at least as far as I've been able to identify, will not include those classes which are empty.

To allow for a visual comparison between the maps, however, I would like the legend symbols to be present even if they are not used in the map. The reader can parse from the colors on the map that some of the categories are not fulfilled and it allows for easier interpretation for a reader comparing the maps side-to-side.

I'm hoping this is a simple issue where I've just missed something.


Values or classes not present in the data are typically not displayed in an automatically generated legend. There are a couple of workarounds typically used to address this.

  • Create a sample dataset containing all values/classes and use that to generate the legend, but keep it out of view in the map.
  • Convert the automatically created legend to a graphic - again, from a sample set containing all values or by piecing together multiple legends to get the whole range. The legend will no longer update or be linked to the data in this case.
  • Create a symbology in a data set that does contain all values, save that symbology to a file, then apply it to the other layers. Typically when saved symbology is applied, even empty classes are represented - sometimes they can be manually added as well. (This is ArcGIS thinking, and I am unsure if QGIS behaves the same way.)
  • While not ideal in terms of automation across multiple maps, this solution works perfectly. Thank you for your timely help. – pophealth Dec 10 '14 at 17:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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