How can I plot a image with (x,y,r,g,b) coordinates using ggplot2?
问题 I have a data frame image.rgb , into which I have loaded the r,g,b value for each coordinate of an image (using the jpeg and reshape packages). It now looks like: > head(image.rgb) y x r g b 1 -1 1 0.1372549 0.1254902 0.1529412 2 -2 1 0.1372549 0.1176471 0.1411765 3 -3 1 0.1294118 0.1137255 0.1176471 4 -4 1 0.1254902 0.1254902 0.1254902 5 -5 1 0.1254902 0.1176471 0.1294118 6 -6 1 0.1725490 0.1372549 0.1176471 Now I want to plot this 'image' using ggplot2. I can plot a specific 'channel' (red