matrix - R: Replacing x-axis labels with row names in a plot -


i'm trying draw plot using below matrix. need row names in x-axis , draw plot each of columns in matrix.

            m1 m2 m3 m4 m5 m6 m7 m8 m9 m10 eps_0     1727  4  3  3  2  2  2  2  2   2 eps_0.1   1525  6  5  3  3  3  2  2  2   2 eps_0.2   1487  9  5  4  3  3  3  2  2   2 eps_0.3   1423 12  4  4  3  3  3  3  2   2 eps_0.4   1406 12  6  5  3  3  3  3  2   2 eps_0.5   1383 11  7  6  4  3  3  3  2   2 eps_0.6   1365 12  7  5  5  5  4  4  2   2 eps_0.7   1357 13  6  6  5  4  3  3  2   3 eps_0.8   1326 18 10  7  7  6  5  4  3   3 eps_0.9   1304 15 11  9  8  7  6  5  4   3 eps_1     1290 16 12 10 10  9  8  5  4   3 

below code , graph created.

layout(rbind(1,2), heights=c(7,1))  matplot(cldata, type="l", ylim=c(0,10),  lwd=1, col=1:10, lty=1,         xlab = "eps value", ylab = "no of clusters",          main = "no of clusters eps-minptc combination") axis(1, at=0:10, labels=rownames(cldata),las=2) 

enter image description here

i couldn't directly row names of matrix plot. guess it's because data stored in matrix object. referring thread. therefore wanted replace x-axis labels row names of matrix. able achieve this. original x- axis values still visible.

i want know how can remove original x-axis values , reduce font size of labels , move xlab below column names.


Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -