Boxplot of ggplot2 giving error (does not make the boxes, only a points with a scratches), how to fix? OBS: I did other graphics and it worked, only this one packed

0
boxef <- ggplot (effectsize, aes(subordemfam, varbiom.efs, colour = classe2))  

boxef + geom_point() + geom_boxplot() + 
  xlab("Táxon") + ylab("Effect Size na Variação de Biomassa") + theme_bw() + 
  geom_hline (yintercept = 0) +
  theme(plot.title = element_text(lineheight=.8, face="bold")) +
  theme(panel.grid.major = element_blank(), panel.grid.minor = element_blank())

Neither the geom_hline appears, see:

The boxplot would separate between my rates and their body sizes (small and large, stored in class2), creating two boxplots for each taxon, with effect size values on the vertical axis.

My dataframe is correct and has been used successfully in making other graphics.

    
asked by anonymous 15.03.2018 / 15:21

1 answer

0

Your variable varbiom.efs is like character , you need to make it numeric (or fix the data, if at all). Put this code before the call of your ggplot :

effectsize$varbiom.efs <- as.numeric(effectsize$varbiom.efs)
    
22.11.2018 / 13:43