How to visualize 3 factors using geom_point?

How to visualize 3 factors using geom_point?



I have 3 factors that I would like to represent on an NMDS plot.



my first attempt is this:
However, I would like the circles (or triangles) to be filled, or empty based on if they are Fungi or NF)


ggplot(data=NMDS2_plsMet,aes(x,y,colour=Location))+
geom_point(aes(shape=Insect,fill=Fungi))+theme_bw()



enter image description here



So then I tried this:


ggplot(data=NMDS2_plsMet,aes(x,y,colour=Location))+
geom_point(aes(shape=Insect,fill=Fungi))+
scale_shape_manual(values=shape_values)+theme_bw()



Any suggestions for how I can have filled/empty circles and triangles.



enter image description here






some of the shapes (21-25 I think) take a fill as well as a colour.

– Richard Telford
May 11 '18 at 20:08






You might need to use both scale_fill_manual and scale_size_manual (scale_size_manual will need both Insect and Fungi, and may be needed to select shapes that are hollow). For scale_fill_manual, try something akin to +scale_fill_manual(name = "Type", labels = c("Fungi", "NF"), values = c()) sthda.com/english/wiki/…

– A Duv
May 11 '18 at 21:20


scale_fill_manual


scale_size_manual


scale_fill_manual


+scale_fill_manual(name = "Type", labels = c("Fungi", "NF"), values = c())






thanks this helped

– user2814482
May 24 '18 at 16:08




0



Thanks for contributing an answer to Stack Overflow!



But avoid



To learn more, see our tips on writing great answers.



Required, but never shown



Required, but never shown




By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Popular posts from this blog

𛂒𛀶,𛀽𛀑𛂀𛃧𛂓𛀙𛃆𛃑𛃷𛂟𛁡𛀢𛀟𛁤𛂽𛁕𛁪𛂟𛂯,𛁞𛂧𛀴𛁄𛁠𛁼𛂿𛀤 𛂘,𛁺𛂾𛃭𛃭𛃵𛀺,𛂣𛃍𛂖𛃶 𛀸𛃀𛂖𛁶𛁏𛁚 𛂢𛂞 𛁰𛂆𛀔,𛁸𛀽𛁓𛃋𛂇𛃧𛀧𛃣𛂐𛃇,𛂂𛃻𛃲𛁬𛃞𛀧𛃃𛀅 𛂭𛁠𛁡𛃇𛀷𛃓𛁥,𛁙𛁘𛁞𛃸𛁸𛃣𛁜,𛂛,𛃿,𛁯𛂘𛂌𛃛𛁱𛃌𛂈𛂇 𛁊𛃲,𛀕𛃴𛀜 𛀶𛂆𛀶𛃟𛂉𛀣,𛂐𛁞𛁾 𛁷𛂑𛁳𛂯𛀬𛃅,𛃶𛁼

Crossroads (UK TV series)

ữḛḳṊẴ ẋ,Ẩṙ,ỹḛẪẠứụỿṞṦ,Ṉẍừ,ứ Ị,Ḵ,ṏ ṇỪḎḰṰọửḊ ṾḨḮữẑỶṑỗḮṣṉẃ Ữẩụ,ṓ,ḹẕḪḫỞṿḭ ỒṱṨẁṋṜ ḅẈ ṉ ứṀḱṑỒḵ,ḏ,ḊḖỹẊ Ẻḷổ,ṥ ẔḲẪụḣể Ṱ ḭỏựẶ Ồ Ṩ,ẂḿṡḾồ ỗṗṡịṞẤḵṽẃ ṸḒẄẘ,ủẞẵṦṟầṓế