Skip to content

Instantly share code, notes, and snippets.

@Su-Shee
Created February 14, 2013 19:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Su-Shee/4955869 to your computer and use it in GitHub Desktop.
Save Su-Shee/4955869 to your computer and use it in GitHub Desktop.
Plain R without Shiny
# Now we create the barchart:
barplot( height, ylim = c(0, max_bar), # height x axis, length y axis
main = "Zu- und Fortzüge nach Berlin", # headline
ylab = "Anzahl in 1000", # y axis label
names.arg = years, cex.names = 0.5, # year under bar, slightly smaller
beside = TRUE, # sideways
col = c("#990033", "#009933") # assign colors
)
# We're adding a shiny legend, placed topleft
legend( "topleft",
c("Zuzüge", "Fortzüge"),
cex = 0.8,
bty = "n",
fill = c("#990033", "#009933")
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment