Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Closed
wch opened this Issue · 1 comment

2 participants

Winston Chang Hadley Wickham
Winston Chang
Collaborator
wch commented

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

Example:

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

set.seed(3893393)
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 Wickham
Owner

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 Wickham hadley closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.