Plot Matrix using gradient of color/colors

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Plot Matrix using gradient of color/colors

UGuntupalli
This post was updated on .
Hello ,
       I would like to plot a matrix of data using gradient of colors (say red and yellow) . I have hunted through multiple forums and posts -  I have been unable to find a solution that meets the needs . Would appreciate some guidance .
 
      I am attaching a figure that I was able to generate using binary matrix - I would like similar plot for a matrix which is not really binary ( but multiple values) and the values always range between 0 and 1 .




      This seems to work fine - but I dont know how to customize the plot - by adding axes.

library(fields)
image.plot(matrix((data=corrs), ncol=720, nrow=1440))


Best
Uday