Skip to content

Tweak position of categorical data #1109

Closed
@tongcx

Description

@tongcx

For the following example

x <- c(1,3,2,5)
y <- c("a","c","d","c")
qplot(x, y)

How do I move all points a bit downward? I can use position_jitter, but that's random. I think the best solution is to program a customized version of sth like position_jitter. However after reading source code
https://github.com/hadley/ggplot2/blob/master/R/position-jitter.r
https://github.com/hadley/ggplot2/blob/master/R/position-.r
I am still not clear how to achieve this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions