ggplot2 labeling and coloring specific Data points
1
0
Entering edit mode
@hamidreza-hashemi-23384
Last seen 3.7 years ago
United States

Hi All,

My data frame has two columns: Gene names and Z scores. I am using ggplot2 package to make a scatter plot. I was able to create the plot but I don't know how to show only specific gene names on the plot and also how to change the color of the gene names shown.

Here is what I am using:

library(ggplot2) Data<- read.csv("Data.csv", header = TRUE) ggplot(Data, aes(x = Count, y = Z_Score))

Lets say I want to show genenames "Gene1", "Gene2", "Gene3" on the plot and in "red", "blue", "green" respectively.

Many Thanks, Hamid

ggplot2 package Scatter plot • 2.9k views
ADD COMMENT
0
Entering edit mode

you posted this on biostars!! Can't just post everywhere without waiting for a response from one place. You have committed a spam.

ADD REPLY
0
Entering edit mode
Kevin Blighe ★ 4.0k
@kevin
Last seen 24 days ago
Republic of Ireland

Hey Hamid, please check the answers on Biostars. It would be great if, in future, you could mention [in your post] the other websites / forums where you have posted the question, so as to not duplicate efforts. No problem this time! Thanks!

Biostars post: https://www.biostars.org/p/436837/

ADD COMMENT

Login before adding your answer.

Traffic: 474 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6