Question: Graph for PCs, can't apply colours to the points.
1
gravatar for fatimarasool135
12 months ago by
fatimarasool13560 wrote:

Hi,

I need help in drawing the graphs by using the R.

I have generated the graphs for genes by following code as but colours for each plot are not appeared in graph.

plot(pc$x[,1:2], pch = 21, bg = pData(bg_data)$Color, cex = 2, ylim = c(-100, 100), xlim = c(-100, 100), xlab = "PC1", ylab = "PC2", cex.lab = 1.4, cex.axis = 1.3)
rna-seq R • 277 views
ADD COMMENTlink modified 12 months ago by zx87549.4k • written 12 months ago by fatimarasool13560
5
gravatar for Jean-Karim Heriche
12 months ago by
EMBL Heidelberg, Germany
Jean-Karim Heriche22k wrote:

Read the docs. bg sets the background color of the points, To set the point color, use col.

ADD COMMENTlink written 12 months ago by Jean-Karim Heriche22k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1461 users visited in the last hour