Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Also, <code>image</code> could be helpful:</p> <pre><code>#matrix with the part of your data 10x10 you uploaded mat &lt;- as.matrix(read.table(text = "0 0 0 0 0 0 0 0 0 0 41 10 2 0 0 0 0 0 0 0 75 36 20 9 4 2 1 0 0 0 91 65 47 31 20 13 8 5 3 2 97 78 64 47 35 25 18 12 8 5 99 88 76 63 50 39 29 22 16 11 99 93 85 74 63 52 42 32 25 19 99 96 91 83 73 64 53 44 35 28 99 98 94 88 81 72 64 54 46 37 99 98 96 92 87 80 72 64 55 47")) #neccessary step to `image` the expected. read `?image` t_mat &lt;- t(mat[ncol(mat):1,]) #basic plot image(t_mat, col = colorRampPalette(c("blue", "red"))(10), axes = F) #creaty matrix with `NA`s and fill #only the values you want to appear yellow. #here: say 45 to 55 yellows &lt;- matrix(nrow = nrow(t_mat), ncol = ncol(t_mat)) yellows[which(t_mat &gt; 45 &amp; t_mat &lt; 55)] &lt;- t_mat[which(t_mat &gt; 45 &amp; t_mat &lt; 55)] #overlay "yellows" to basic plot image(yellows, col = rgb(1,1,0,1/2), add = T) </code></pre> <p>The plot looks:</p> <p><img src="https://i.stack.imgur.com/z4pjt.png" alt="enter image description here"></p> <p>P.S. I guessed that's what the yellow borders are for. Sorry if I misunderstood.</p> <p><strong>EDIT</strong></p> <p>Added example <code>legend</code> and labels:</p> <pre><code>title(main = "imageplot", xlab = "x axis", ylab = "y axis") legend(x = 0.6, y = 1.15, legend = c("&lt;45", "45-55", "&gt;55"), fill = c("blue", rgb(1,1,0,1/2), "red"), xpd = T, ncol = 3) </code></pre> <p><strong>EDIT2</strong></p> <p>Added labels to both axes:</p> <pre><code>#I guess you'll need to use `axis(1, at = seq(0,1,0.0101), labels = seq(1, 100, 1))` #but I'm not sure axis(1, at = seq(0,1,0.11), labels = seq(1, 10, 1)) axis(2, at = seq(0,1,0.11), labels = seq(1, 10, 1)) </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload