MomX / Momocs

:dove: Morphometrics using R
http://momx.github.io/Momocs/
52 stars 19 forks source link

Color the mean shapes in a panel #240

Open raz1 opened 3 weeks ago

raz1 commented 3 weeks ago

Hi,

I wish to color the mean shapes in a panel (different colors) using this code:

ms <- MSHAPES(data_f, 'type')
Out(ms$shp) %>% panel(names=T, fac='type',palette = col_spring)

I get this error: not a valid column specification, returning NULL

Any idea why and how to solve it?

vbonhomme commented 3 weeks ago

Yep, type (and fac) no longer exist in the freshly created Out !

Le mer. 30 oct. 2024 à 09:36, Ely Raz @.***> a écrit :

Hi,

I wish to color the mean shapes in a panel (different colors) using this code:

ms <- MSHAPES(data_f, 'type') Out(ms$shp) %>% panel(names=T, fac='type',palette = col_spring)

I get this error: not a valid column specification, returning NULL

Any idea why and how to solve it?

— Reply to this email directly, view it on GitHub https://github.com/MomX/Momocs/issues/240, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABECQFS7VBIMXXZ5NDIORADZ6CLCNAVCNFSM6AAAAABQ3QQTUGVHI2DSMVQWIX3LMV43ASLTON2WKOZSGYZDGMRXHAZTGOA . You are receiving this because you are subscribed to this thread.Message ID: @.***>

raz1 commented 3 weeks ago

Can it be solved? it will be just visualize nice to color each mean shape

vbonhomme commented 3 weeks ago

Yes, simply create a tibble with, say, enframe using the names !

Le mer. 30 oct. 2024 à 19:53, Ely Raz @.***> a écrit :

Can it be solved? it will be just visualize nice to color each mean shape

— Reply to this email directly, view it on GitHub https://github.com/MomX/Momocs/issues/240#issuecomment-2448087398, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABECQFQYB3SGDK5BFN6M7OTZ6ETKFAVCNFSM6AAAAABQ3QQTUGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINBYGA4DOMZZHA . You are receiving this because you commented.Message ID: @.***>