29
में बहु कॉलम किंवदंती बनाना मेरे पास निम्न स्क्रिप्ट है, जो मान लीजिए जिसमें दो कॉलम किंवदंती के साथ साजिश तैयार की गई है।ggplot
#!/usr/bin/Rscript
library(ggplot2)
library(plyr)
library(reshape2)
library(scales)
file <- "http://dpaste.com/1354089/plain/";
dat <-read.table(file,header=TRUE);
datm <- melt(dat)
# Plot them
ggplot(datm,aes(x = variable,y = value,fill = Term)) +
geom_bar(position = "fill") +
scale_y_continuous(labels = percent_format())+
theme(legend.direction ="vertical",legend.position = "bottom")+
guides(color=guide_legend(ncol=2))+ # this doesn't seem to work
ggsave(file="~/Desktop/test.pdf",width=11,height=11)
लेकिन यह इस आंकड़े बनाता बजाय
मैं कैसे इसे सही ढंग से कर सकते हैं?
+1 संक्षिप्त जवाब के लिए के साथ चेतावनी का ध्यान रखना चाहिए। कोई सुझाव, चेतावनी को कैसे हल करें? – neversaint