On the example given below, which can easily be done using the `levelplot` function of `R`, I would like to ask a question of interpretation: if, for example, I have several values with `drat` on the x axis, and`hp` on the y-axis, how R decided which color to put in the cell referring to the cross-section of `drat` with `hp`? Is it by the mean of these various values? Or is it if most of them are in the defined range?

Anyway ... I researched this and found nothing that could answer my question. If anyone can help, thank you in advance.

[![enter image description here](https://i.stack.imgur.com/N3Ubn.png)](https://i.stack.imgur.com/N3Ubn.png)