5
I have this graph created by the function geom_boxplot
. Would you like to label each boxplot correctly. What am I doing wrong? I am using the wrong factor?
https://drive.google.com/file/d/1EQpCdv9VVCCO3ERJrstYSX6dnu8tLulC/view?usp=sharing
df1<- read.table("TBZ_2.txt", header = TRUE, sep = "\t")
require(reshape2)
require(ggplot2)
require(dplyr)
df.m1 <- melt(dados1, id.var = "ID")
df.m2 <- filter(df.m1, variable == "BRANCO")
ggplot(data = df.m2, aes(x=variable, y=value, label=ID)) + geom_boxplot(aes(fill=ID)) +
labs(x = "Equipamentos", y = "Resultados (NTU)") +
theme_grey(base_size = 12) +
facet_wrap(~`variable`,scales = "free") +
geom_text(data = df.m2, aes(group=ID), size = 3)
Did I misunderstand what the AP meant by labels? It seems redundant to me to have EPXX information in two different locations, as I did, but in three locations (x-axis, caption and above each box) it’s pretty weird.
– Marcus Nunes
@Well, that’s what’s on the graph of the question. Sometimes you want other information (median values, for example) but in the question are the
EP
's well aligned in vertical.– Rui Barradas
Yeah, it makes sense.
– Marcus Nunes
@No, I don’t think I do. There goes 15 points but it’s like this:).
– Rui Barradas
I meant your reasoning makes sense, not the requested graph : )
– Marcus Nunes
@Marcusnunes thanks a lot for the help! Helped a lot =)
– Emilio Pinho