Closed moglideveloper closed 2 years ago
Have you tried using set.seed()
to fix the pseudo-random number generator? eulerr uses random initial starting positions, which means that each fit of the diagram is likely to be different.
There are a few normalization routines, which for instance ensure that two-set diagrams remain the same, but this doesn't work exactly the same for diagrams with more sets.
Can you please try to use set.seed()
before calling euler()
, setting it to the same value each time, please? I am not 100% sure that it will resolve the issue perfectly, but please try this first.
As suggested, set.seed solved this.
Thanks
Context :
Trying to create some venn diagram animation using R. https://github.com/moglideveloper/animation
Attempt 1 (with two sets):
Knit animation/with2Sets/animation.Rmd and open
generated animation.html in browser.
It gives a satisfactory animation (refer below)
Attempt 2 (with four sets):
Knit animation/with4Sets/animation.Rmd and open
generated animation.html in browser.
Animation is not satisfactory (refer below)
Looks like every time diagram is generated for four sets, co-ordinates and
radius of Venn diagram changes.
To confirm, that co-ordinates and radius of Venn diagram
changes on every run, try executing executeThisFileMultipleTimes.R
multiple times and verify the generated diagram.
Refer below sample generated diagrams :
Question:
How we can make sure, that co-ordinates and radius of Venn diagrams,
doesn't changes on every draw ?
https://github.com/moglideveloper/animation