When I plot a matrix
with the image
function as a TIFF file, I often get vertical or horizontal lines.
My matrix is of 150000 rows x 2000 columns, the lines also appears when plotting matrices of 150000 rows x 100 columns. The results are the same.
Where do the lines come from? Is this some sort of pixelated artifact? I get them almost all the time.
The matrix looks like this:
V999 V1000 V1001 V1002 V1003 V1004 V1005 V1006 V1007 V1008 V1009 V1010
[1,] 1 4 0 0 15 15 15 15 8 0 1 0
[2,] 0 3 12 5 15 15 15 1 15 4 0 2
[3,] 0 0 0 3 6 15 15 15 15 15 0 3
[4,] 3 6 15 15 15 15 15 0 3 15 15 2
[5,] 15 15 15 0 3 15 15 2 1 5 8 11
[6,] 2 1 5 8 11 15 15 15 0 0 4 3
tiff("test.tiff", width=450, height=1100)
image(t(mc), col = col1, main="950-1500"
dev.off()
Any hints/comments will be much appreciated.
You're seeing an aliasing artifact from the x11() display. You can try dragging the window to make it bigger or smaller and eventually you'll find a window size height and width that is compatible with your desired resolution.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With