eulerr icon indicating copy to clipboard operation
eulerr copied to clipboard

euler graphics with 3 groups: problems

Open OSUBUCKEYE1993 opened this issue 1 year ago • 3 comments

There is an issue for the graphics of 3 groups with common "people"

The first coding herebelow produces the A&B (260 shown in the graphics, instead of 50 in the coding) to be smaller than the B&C (50 shown in the graphics instead of 260 in the coding)

V2<- euler(c("A" = 10000, # RACL "B" = 1000, # RACD "C" = 100, # RAAP "B&C" = 250+10, "A&C" = 30+10, "A&B" = 40+10, # le nombre commun a deux groupes "A&B&C" = 15)) # le nombre commun à 3 groupes

plot(V2, shape="circle", fills=c("red3", "salmon1", "red"), edges=list(col="blue"), legend=list(labels=c("A", "B 2023", "C")), labels= c("A","B", "C"), quantities = c("A" = 10000, "B" = 1000, "C" = 100, "B&C" = 260, # ??????? "A&C" = 30, "A&B" = 50, # ????? "A&B&C" = 15))

To solve the issue I had to invert ( in the coding of the plot) A&B and B&C, i,e: A&B is now 60 in the coding and 250 in the plot and bigger than B&C which is now 250 in the coding and 50 in the plot

fitcot2023<- euler(c("A" = 10000, # RACL "B" = 1000, # RACD "C" = 100, # RAAP "B&C" = 50+15, "A&C" = 30+15, "A&B" = 250+15, # le nombre commun a deux groupes "A&B&C" = 15)) # le nombre commun à 3 groupes

plot(fitcot2023, shape="circle", fills=c("red3", "salmon1", "red"), edges=list(col="blue"), legend=list(labels=c("A", "B", "C")), labels= c("A","B", "C"), quantities = c("A" = 10000, "B" = 1000, "C" = 100, "B&C" = 250, # ??????? "A&C" = 30, "A&B" = 50, # ????? "A&B&C" = 15))

OSUBUCKEYE1993 avatar Jun 16 '24 16:06 OSUBUCKEYE1993

Ah, I understand that this tripped you up, but actually the names you give the vector in your input to quantities has no effect, only the ordering has, and it assumes that you order the input same as in the output. Maybe it would be a good idea to allow a named vector actually. Anyway, it seems like you just want to print out the original quantities, so why not just use plot(V2, quantities = TRUE)? Or maybe I'm misunderstanding.

Also, note that shape has no effect in the call to plot() here.

jolars avatar Jun 17 '24 14:06 jolars

Dear sir,

Many thanks, it works fine with plot(V2, quantities = TRUE)

Best regards

De : Johan Larsson @.> Envoyé : lundi 17 juin 2024 16:53 À : jolars/eulerr @.> Cc : CHARRE, Christian @.>; Author @.> Objet : Re: [jolars/eulerr] euler graphics with 3 groups: problems (Issue #111)

Attention : ce courriel ne provient pas des JF, traitez-le avec prudence

Ah, I understand that this tripped you up, but actually the names you give the vector in your input to quantities has no effect, only the ordering has, and it assumes that you order the input same as in the output. Maybe it would be a good idea to allow a named vector actually. Anyway, it seems like you just want to print out the original quantities, so why not just use plot(V2, quantities = TRUE)? Or maybe I'm misunderstanding.

Also, note that shape has no effect in the call to plot() here.

— Reply to this email directly, view it on GitHubhttps://github.com/jolars/eulerr/issues/111#issuecomment-2173632726, or unsubscribehttps://github.com/notifications/unsubscribe-auth/BJH2EMQ5JQ7WP5UOMDG2AS3ZH3Z6FAVCNFSM6AAAAABJMXIR3OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNZTGYZTENZSGY. You are receiving this because you authored the thread.Message ID: @.@.>>

OSUBUCKEYE1993 avatar Jun 18 '24 08:06 OSUBUCKEYE1993

Great! I'll keep this open since I think the interface could be improved here.

jolars avatar Jun 18 '24 09:06 jolars