I have some data here [in a .txt file] which I read into a data frame,
mydf <- read.table("data.txt", header=T,sep="\t")
I melt this data frame next using the following piece of code,
df_mlt <-melt(mydf, id=names(mydf)[1], variable = "cols")
Now I would like to plot this data as a boxplot displaying only values of x>0
, so for this I use the following code,
plt_bx <- ggplot(df_mlt, aes(x=ID1,y=value>0, color=cols))+geom_boxplot()
But the resulting plot looks like the following,
However what I need is to only display positive values of x as individual box plots in the same plot layer. Could someone please suggest what I need to change in the above code to get the proper output, Thanks.