Can I plot a normal matrix like plot(cij)?

Issue #595 resolved
Cheng created an issue

In the cross-correlation plot, using plot(cij) can generate the colourful graph. I have another matrix named p_value, with the same dimension as cij, but the plot command can only output a black-white graph:

plot(p_value, col.regions=bwr.colors(200), at=seq(-1,1,by=0.01), contour=FALSE, xlab="Residue Number", ylab="Residue Number", margin.segments=ch) 2018430-202338.jpg

class(cij) outputs "dccm" "matrix", while class(p_value) only outputs "matrix"

So I think the additional "dccm" property of cij enables plot(cij) to the nice graph.

I wonder, if I can also provide the p_value with the "dccm" property?

Comments (4)

  1. Cheng reporter

    Thank you very much, it works now!

    Can I ask if I can adjust the colour scale so the plot can capture all the values?

    plot.dccm(p_value, col.regions=bwr.colors(200), at=seq(-1,1,by=0.01), contour=FALSE, margin.segments=ch) gives me this plot. Because p_values are within 0 to 1, only white to red are shown. Can I show blue to white to red for 0 to 1 range? 2018430-223141.jpg

    plot.dccm(t_value, col.regions=bwr.colors(200), at=seq(-1,1,by=0.01), contour=FALSE, margin.segments=ch) gives me this. Because t-values are within -20 to 70 but the colour scale is only for -1 to 1, so t-values less than -1 or more than 1 are shown as white. So can I show blue to white to red for -20 to 70 range? 2018430-223530.jpg

  2. Log in to comment