We can tackle this in two steps.
- Get new raster showing area of overlap between pixels of interest
- Get statistics for areas of overlap
(1) Get Area of overlap between pixels of interest:
Using SAGA Raster Calculator from the processing toolbox, we can extract out pixels which meet our criteria.
In this case: get land use data for pixels that are in elevation range 100m-200m
-Main input layer: Elevation Raster
-Additional layers: Land cover Raster
Formula: ifelse(eq(a, 1), ifelse(eq(b, 1),(a*b), 0), 0/0)
(where elevation layer has value of 1 (assigned pixel value for 100-200m) AND landcover has a value of 1 (assigned pixel value for 'Agriculture'), set output pixel value to 1 (if not 1 then set pixel value to null)
This will output a raster which contains pixel value of 1 for areas where elevation and landcover raster pixel values were 1.
(2) Get statistics for areas of overlap:
Use r.stats to compute % of pixels for each pixel value for the raster genertated in step 1.
-Number of fp...: 2
-Print APPROXIMATE percents...: X
-Suppress reporting of any NULLs...: X
-Read fp map as integer...: X
-Hatched area = elevation raster,
-Colored area = land use raster
-Black and white Area = output from step 1
(white area = pixel value 1, (~41.17%))