qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.65k stars 3.01k forks source link

shadow in raster histogram plot area can confuse #41113

Open stragu opened 3 years ago

stragu commented 3 years ago

Describe the bug

The shadow around the raster histogram plot area (giving it a depressed look) might make reading the plot difficult. The colour is similar (if not the same) as the actual data when the symbology is "singleband gray", and it makes it look like there is a peak at the beginning of the x axis range with particular histograms. See for example this histogram of values for a raster layer of watershed basins:

problematic shading highlighted with a red rectangle

In my opinion, this shading is unnecessary, and QGIS users would benefit from having no decoration at all to make the plot as readable as possible. If a frame is considered necessary to show where data is clipped when zooming in, it could at least have an unambiguous colour that is sufficiently distinct to the data's usual red and grey colours.

How to Reproduce

  1. Load a raster layer
  2. Use "Singleband gray" in Properties > Symbology
  3. generate a histogram of the values in Properties > Histogram

QGIS and OS versions

QGIS version 3.10.14-A Coruña QGIS code revision 8374282d2a
Compiled against Qt 5.9.5 Running against Qt 5.9.5
Compiled against GDAL/OGR 2.2.3 Running against GDAL/OGR 2.2.3
Compiled against GEOS 3.6.2-CAPI-1.10.2 Running against GEOS 3.6.2-CAPI-1.10.2 4d2925d6
Compiled against SQLite 3.22.0 Running against SQLite 3.22.0
PostgreSQL Client Version 10.15 (Ubuntu 10.15-0ubuntu0.18.04.1) SpatiaLite Version 4.3.0a
QWT Version 6.1.3 QScintilla2 Version 2.10.2
PROJ.4 Version 493
OS Version Ubuntu 18.04.5 LTS
Active python plugins processing; db_manager; MetaSearch

and

QGIS version 3.10.12-A Coruña QGIS code revision 75c848ffb1
Compiled against Qt 5.11.2 Running against Qt 5.11.2
Compiled against GDAL/OGR 3.1.4 Running against GDAL/OGR 3.1.4
Compiled against GEOS 3.8.1-CAPI-1.13.3 Running against GEOS 3.8.1-CAPI-1.13.3
Compiled against SQLite 3.29.0 Running against SQLite 3.29.0
PostgreSQL Client Version 11.5 SpatiaLite Version 4.3.0
QWT Version 6.1.3 QScintilla2 Version 2.10.8
Compiled against PROJ 6.3.2 Running against PROJ Rel. 6.3.2, May 1st, 2020
OS Version Windows 10 (10.0)
Active python plugins db_manager; MetaSearch; processing

Additional context

Tested with "Fusion" and "Windows" styles.

roya0045 commented 3 years ago

I think the better change would be to have the grid light gray and the data be the darker element.

stragu commented 3 years ago

@roya0045 that makes perfect sense, you're right. What about the frame?

Just for some inspiration, here are examples of different themes from the R package ggplot2.

Default theme:

histogram with default ggplot2 theme

Black and white theme:

ggplot2 histogram with black and white theme

Minimal theme:

ggplot2 histogram with minimal theme

And Base R histogram:

Base R histogram

I guess for QGIS, the importance of the frame is tied to the ability to zoom into the plot (something like the "black and white" theme could do the trick), but I think doing away with that shadow would be an improvement in any case.

Pedro-Murteira commented 2 years ago

Still valid on QGIS 3.22.3. (Windows 10)