Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This is just c(red, grey, green)
- my_colour_pal <- c("#bc0303", "#4b5566", "#17a008")
- df <-
- data.frame(Group1 = c("one", "one", "two"),
- Group2 = c("val1", "val2", "val3"),
- Value = c(10, 10, 10),
- Colour = c(-1, 0, 1), stringsAsFactors = FALSE)
- treemap(df, index = c("Group1", "Group2"), type = "value",
- vSize = "Value", vColor = "Colour", palette = my_colour_pal)
- df <-
- data.frame(Group1 = c("one", "one", "two"),
- Group2 = c("val1", "val2", "val3"),
- Value = c(10, 0, 10),
- Colour = c(-1, 0, 1), stringsAsFactors = FALSE)
- treemap(df, index = c("Group1", "Group2"), type = "value",
- vSize = "Value", vColor = "Colour", palette = my_colour_pal)
- df <-
- data.frame(Group1 = c("one", "one", "two"),
- Group2 = c("val1", "val2", "val3"),
- Value = c(0, 0, 10),
- Colour = c(-1, 0, 1), stringsAsFactors = FALSE)
- treemap(df, index = c("Group1", "Group2"), type = "value",
- vSize = "Value", vColor = "Colour", palette = my_colour_pal)
- Error in do.call("format", args.legend) : second argument must be a list
- my_colour_pal <- c("#bc0303", "#4b5566", "#17a008")
- df <-
- data.frame(Group1 = c("one", "one", "two"),
- Group2 = c("val1", "val2", "val3"),
- Value = c(10, 10, 0),
- Colour = c(-1, 0, 1), stringsAsFactors = FALSE)
- treemap(df, index = c("Group1", "Group2"), type = "value",
- vSize = "Value", vColor = "Colour", palette = my_colour_pal)
- df <-
- data.frame(Group1 = c("one", "one", "two"),
- Group2 = c("val1", "val2", "val3"),
- Value = c(10, 10, 0),
- Colour = c(-1, -1, 1), stringsAsFactors = FALSE)
- treemap(df, index = c("Group1", "Group2"), type = "value",
- vSize = "Value", vColor = "Colour", palette = my_colour_pal)
- Error in do.call("format", args.legend) : second argument must be a list
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement