Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
304 views
in Technique[技术] by (71.8m points)

ggplot2 - Is there an R package that expands the number of possible shapes for geom_point()

So i'm making a ggtern plot where geom_point is being is used for a Ternary plot with 7 different groups. Each group has a different color, a different shape and a different fill. I want 7 shapes where the shapes can be filled with a different color. However the base R shape pallet only includes 5 such shapes (corresponding to the number 21-25). Is there an R package that expands this range (let say to include a regular pentagon and star).

p1 = ggtern(data=df,aes(x=x,y=y,z=z, colour=group,fill = group, shape=group)) +
    geom_point(stroke=1.5,size=4) + theme_bw() +
    scale_shape_manual(values=c(21,22,23,24,25,5,6))
question from:https://stackoverflow.com/questions/66053049/is-there-an-r-package-that-expands-the-number-of-possible-shapes-for-geom-point

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

1.4m articles

1.4m replys

5 comments

57.0k users

...