Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Warning when combining coord_radial() and absolute theme(panel.widths) #6701

Open
Labels
messagesrequests for improvements to error, warning, or feedback messages
@jbengler

Description

Hi Teun,

is there a way to produce pie charts with absolute dimensions without triggering a warning?

library(ggplot2)
data.frame(cat = c("A", "B", "C"), value = c(25, 40, 60)) |>
 ggplot(aes(x = NA, y = value, fill = cat)) +
 geom_col(position = position_stack()) +
 coord_radial(theta = "y", expand = FALSE) +
 theme(panel.widths = unit(50, "mm"), panel.heights = unit(50, "mm"))
Warning message:
Aspect ratios are overruled by `panel.widths` and `panel.heights` theme elements. 

At the moment these warnings are spoiling my package tests 🙃

Best
Broder

Metadata

Metadata

Assignees

No one assigned

    Labels

    messagesrequests for improvements to error, warning, or feedback messages

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

        AltStyle によって変換されたページ (->オリジナル) /