6

I've tried all the settings in both the Map and Layout (QGIS 3.22.6), but I can't add more labels aside from the default min and max. I've tinkered with classifying the breaks- linear / equal interval, but that doesn't affect the labeling. I cannot find any option to add more labels. Any ideas? I want maybe 5 or 6 total labels.

enter image description here

2 Answers 2

7

You need to change the interpolation method from Linear to Discrete to add more labels to the symbology style:

enter image description here

Notice the labels and colors of the symbology will be reversed when changing the interpolation method.

6
  • 1
    This changes the color ramp from interpolated values to a specific number of discrete classes. The result looks highly different and it is not what the user wants. They want to display more labels in their existing, interpolated color ramp. Commented May 9, 2023 at 17:35
  • 1
    I was looking for more of a numpy - add more tick marks level of customization. Or ArcGIS I'm pretty sure allows for adding labels to a continuous color ramp. I appreciate @ahmadhanb method and used it, but I had to discretize/bin the data, when my preference would be to keep continuous. But this may be the only way? Commented May 9, 2023 at 18:15
  • @bugmenot123 I don't know what is the reason for the downvoting as if there is another better solution than the proposed one. I disagree that the result looks highly different. In fact, it is much more precise to the exact value of where the labels should be located. If the labels will be placed on a continuous color ramp, they will be approximate and never correct.
    – ahmadhanb
    Commented May 10, 2023 at 0:29
  • The map in your video changes from a nicely interpolated raster display to one with only five classes. That is a highly different visualisation. The user asked about legend labels, not a different color ramp classification. Approximate labels are perfectly fine when rendering with an interpolated color ramp. Commented May 10, 2023 at 6:33
  • @bugmenot123 But he can increase the number of classes if he wants a smoother color range. I just showed the OP how it can be done.
    – ahmadhanb
    Commented May 10, 2023 at 7:03
4

You might take a look at the "Legend Settings" in the Symbology tab of the map item you want to classify. It allows a choice between continuous and discrete. Next, in your print layout you can adjust both symbol spacing and symbol size of this color ramp, it is a discrete one, but the map is still continuous. I hope the attached image, however crude, demonstrates it a little. enter image description here

Kind regards, Christiaan

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.