I am new to stack-overflow and a semi newby in R and hope one of you could help me out.
For my ray/shark diet research project I want to display my data with a balloon plot with visible grids like a table, where the x-axis (on top) displays the name of the predator species divided in category ray or shark (Group), (so basically two head rows), whereas the y-axis displays the name of the prey species and taxonomy.
In the mean time I figured this script out in the package gplots in order to get different columns:
attach(frame2)
balloonplot(x=list(Group,Sample), y=list(Phylum, Order, Family, Organism), z=Abundance, sort=TRUE,
main="try out", xlab ="", ylab="",
scale.range="absolute",
show.zeros= FALSE,
scale.method="volume",
label.lines=FALSE,
dotcolor="grey",
zlab="size",
cum.margins=FALSE,
label = FALSE, show.margins = FALSE)
Looking like this (still very ugly): Try out Arthropods
Now I like to figure out how to get the Predator names (x columns) in an angle so they get visible, and in Italic. Normally in ggplot2 I use the following code:
axis.text.x = element_text(face="italic", angle=30, hjust=1, vjust=1),
Though, this is not working in the balloon plot function of gplots and I could only find the functions text.size, text.color and rowsrt, colsrt, but I do not know how to get an angle only on the second column header (predator species), and Organism column.
colsrt=30,
I get this error: formal argument "colsrt" matched by multiple actual arguments
Furthermore, I do not understand why the first header of the columns (Group: Ray, Sharks) does not divide the predator species automatically but displays rays/sharks twice.. This is not the case in the "Titanic" example.
Thanks in advance!