Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong color using geom_arc_bar #315

Closed
Hrq98 opened this issue Jan 11, 2024 · 2 comments
Closed

Wrong color using geom_arc_bar #315

Hrq98 opened this issue Jan 11, 2024 · 2 comments

Comments

@Hrq98
Copy link

Hrq98 commented Jan 11, 2024

When using geom_arc_bar, the color of the plot doesn't match the color I input.
code:
ggplot()+
geom_arc_bar(data=df,aes(x0=x0, y0=y0,r0=r0,r=r,start=start,end=end,fill=c("green","blue")))
plot:
图片1
Please advise,thanks!

@Hrq98
Copy link
Author

Hrq98 commented Jan 11, 2024

the problem has been solved by scale_fill_identity(my_color) ,however I can't get rid of the borderline, I tried
color=NA,color=NULL,color ="transparent",color=my_color,all failed to get rid of the borderline. Please advise,thanks!

@thomasp85
Copy link
Owner

Can you provide a reproducible example.

The following shows that setting color to NA generally works

arcs <- data.frame(
    start = seq(0, 2 * pi, length.out = 11)[-11],
    end = seq(0, 2 * pi, length.out = 11)[-1],
    r = rep(1:2, 5)
)

# Behold the arcs
ggplot(arcs) +
    geom_arc_bar(aes(x0 = 0, y0 = 0, r0 = r - 1, r = r, start = start,
                     end = end, fill = r), colour = NA)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants