Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Chart to svg
data = read.table("/home/edwin/edwin/filter.txt", header=TRUE, sep="\t")
dim(data)
library(RColorBrewer)
qual_col_pals = brewer.pal.info[brewer.pal.info$category == 'qual',]
col_vector = unlist(mapply(brewer.pal, qual_col_pals$maxcolors, rownames(qual_col_pals)))
svg(filename="Std_SVG.svg",
width=20,
height=8,
pointsize=12)
barplot(as.matrix(data), col=col_vector, las=2, cex.axis = 0.5, cex.names = 0.5)
barplot(as.matrix(data), col=col_vector, las=2, legend.text = TRUE)
dev.off()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.