Skip to content

Annotation_raster does not work with scale_x_reverse #500

Closed
@bleutner

Description

@bleutner

Annotation_raster is not displayed, when one scale is reversed.

qplot(mpg, wt, data = mtcars) + annotation_raster(rainbow, xmin = 15,xmax = 20, ymin = 3, ymax = 4)

swiching xmin and xmax, doesn't affect plotting
qplot(mpg, wt, data = mtcars) + annotation_raster(rainbow, xmin = 20, xmax = 15, ymin = 3, ymax = 4)

doesn't work
qplot(mpg, wt, data = mtcars) + annotation_raster(rainbow, xmin = 15, xmax = 20, ymin = 3, ymax = 4) + scale_x_reverse()

Workaround: negative Coordinates
qplot(mpg, wt, data = mtcars) + annotation_raster(rainbow, xmin=-15,xmax=-20, ymin=3, ymax=4) + scale_x_reverse()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions