Permalink
Browse files

Fix for handling duplicate scales

  • Loading branch information...
1 parent 404f72f commit 3d2620c21c3ff4a627bcad695e72916702a2b7b6 @wch wch committed Jul 19, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 R/scales-.r
View
@@ -14,7 +14,7 @@ Scales <- setRefClass("Scales", fields = "scales", methods = list(
if (any(prev_aes)) {
# Get only the first aesthetic name in the returned vector -- it can
# sometimes be c("x", "xmin", "xmax", ....)
- scalename <- scales[[prev_aes]]$aesthetics[1]
+ scalename <- scales[prev_aes][[1]]$aesthetics[1]
message("Scale for '", scalename,
"' is already present. Adding another scale for '", scalename,
"', which will replace the existing scale.")

0 comments on commit 3d2620c

Please sign in to comment.