Error when all data is outside limits of continuous scale #627

wch opened this Issue Jul 18, 2012 · 1 comment


None yet
2 participants

wch commented Jul 18, 2012

This is from the examples:

# OK
qplot(mpg, wt, data=mtcars) + ylim(0, 10)

# All data is outside y limits - Error
qplot(mpg, wt, data=mtcars) + ylim(10, 20)
# Error: Discrete value supplied to continuous scale

hadley commented Jul 18, 2012

I think this should be simple fix: make censor return NA_real_ instead of NA (which is logical, and hence counted as discrete). Even better you should return an NA of the same type as x - but I don't know an easy way of doing that.

wch closed this in 404f72f Jul 18, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment