简体   繁体   中英

plotting issue on R (using heatmaps)

I have a matrix to plot and I am using the following lines:

library(lattice)
levelplot(cont.freq)

I want to get rid of the black things in the plot? I would like to use rownames and colnames of the matrix for x&y labeling. However I don't know how to represent them in a nice way.

By the way, matrix is 1284x1284..

在此处输入图片说明

Following works:

x_at <- pretty(seq_len(nrow(cont.freq)))
y_at <- pretty(seq_len(ncol(cont.freq)))
levelplot(cont.freq, rm.na = TRUE, scales=list(y=list(at=y_at),x=list(at=x_at)), xlab="Residue ID", ylab="Residue ID", main="Contact Frequency")

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM