Skip to content

coord_polar causes error with ggtext::element_markdown #4080

Closed
@mevers

Description

Originally reported as a ggtext issue here I was advised by @clauswilke to flag this here as well.

Using coord_polar with ggtext::element_markdown to theme x-axis labels causes an error

Error in grid.Call.graphics(C_setviewport, vp, TRUE) :
non-finite location and/or size for viewport

with the plot still drawn correctly.


A minimal & reproducible example:

df <- data.frame(name = sprintf("**%s**", LETTERS[1:4]), value = 1:4)

library(ggplot2)
library(ggtext)

ggplot(df, aes(name, value)) +
    geom_point() +
    coord_polar() +
    theme(axis.text.x = element_markdown())

Removing coord_polar gets rid of the error.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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