I generated an image in R from two-dimensional data - x.
x
graphics::image(ifelse(drop(x)!=0, x, NA))
I would like to add a tex
As @MrFlick mentioned, image() rescales values to the 0-1 range.
image()
See below example:
#dummy data set.seed(123) x <- matrix(runif(100),nrow=10) #plot image(x) #add text and a line text(0.1,0.1,"text") segments(0.5,0.1,0.2,0.25)