I have a dataset, for example, iris, and I want to visualize the relationships between two of its covariates: Sepal.Length and Sepal.Width. It is easy to make a scatter plot:
plot(iris$Sepal.Length, iris$Sepal.Width)
However, if I want to make the plot a heat map (showing how many data points fall into each pixel), with pixels in 0.5 x 0.5, is there an easy way to plot the heat map without having to take pains in transforming the data?
Ideally I would like a solution that is easy for me to modify the width and length of the pixels, or how many pixels per row and per column for the whole plot. Also, how can I make the heat map after scale_x_log10() on x axis?
Thanks