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

euler graphics with 3 groups: problems #111

Open
OSUBUCKEYE1993 opened this issue Jun 16, 2024 · 3 comments
Open

euler graphics with 3 groups: problems #111

OSUBUCKEYE1993 opened this issue Jun 16, 2024 · 3 comments

Comments

@OSUBUCKEYE1993
Copy link

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))

@jolars
Copy link
Owner

jolars commented Jun 17, 2024

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.

@OSUBUCKEYE1993
Copy link
Author

OSUBUCKEYE1993 commented Jun 18, 2024 via email

@jolars
Copy link
Owner

jolars commented Jun 18, 2024

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

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

No branches or pull requests

2 participants