Skip to content

Could ggplot support positioning the axis within the panel (e.g. in guide_axis)? #6852

@davidhodge931

Description

@davidhodge931

Apologies if this has already been asked.

Sometimes it might be wanted to place an axis within a panel (e.g. at zero).

I was wondering if it was possible for dup_axis to provide this functionality?

So something like this for a y axis intercepting the x at 0..

p +
  scale_y_continuous(
    sec.axis = dup_axis(
      xintercept = 0,
    )
  )

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