position_stack gives warnings when >128 discrete items on x axis #779

wch opened this Issue Mar 9, 2013 · 1 comment


None yet

2 participants

wch commented Mar 9, 2013

From: https://groups.google.com/forum/?fromgroups=#!topic/ggplot2/XImz-gJOVlk


hapCount <- 4
markerCount <- 129    # 128 results in no warning

fakeyData <- data.frame(
  value          = runif(markerCount* hapCount),
  markerPosition = paste("pos", rep(1: markerCount, hapCount), sep=""),
  haplotype      = paste("hap", rep(1: hapCount, each= markerCount), sep=""))

ggplot(fakeyData, aes(x=markerPosition, y=value, fill=haplotype, color=haplotype)) + 
  geom_bar(stat="identity", position="stack") 
# Warning message:
# position_stack requires constant width: output may be incorrect 
hadley commented Feb 24, 2014

This sounds like a great feature, but unfortunately we don't currently have the development bandwidth to support it. If you'd like to submit a pull request that implements this feature, please follow the instructions in the development vignette.

@hadley hadley closed this Feb 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment