Skip to content

AsIs aesthetics #1518

Closed
Closed
@schloerke

Description

@schloerke

I'm trying to use aesthetics with the AsIs function to use values as they are.

library(ggplot2)

ggplot(data = iris, aes(Sepal.Length, Sepal.Width)) + geom_point(aes(size = I(5)))
# Error in data.frame(size = 5, PANEL = c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,  : 
  arguments imply differing number of rows: 1, 150
# thought process... produces error.  ok, I can make it longer.  trying again.
ggplot(data = iris, aes(Sepal.Length, Sepal.Width)) + geom_point(aes(size = I(rep(5, nrow(iris)))))

screenshot 2016-01-25 14 20 15

This produces a plot that is treated as a true value, rather than AsIs.

How can I make something a 'parameter' through the use of aes()?

  • Barret

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions