Created
December 9, 2013 20:00
-
-
Save ivan-krukov/7879772 to your computer and use it in GitHub Desktop.
Matrix plotting in R
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#this is a simple way to plot a matrix from a txt file | |
mat_data_frame=read.table("data.txt",header=F) | |
#rev is there to start plotting M(0,0) in the upper left corner | |
#col=rainbow(10) uses the rainbow color palette. You can find other ones here: | |
#http://stat.ethz.ch/R-manual/R-devel/library/grDevices/html/palettes.html | |
image(as.matrix(rev(mat_data_frame)),col=rainbow(10)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment