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

Simple example #19

Open
grero opened this issue Jan 10, 2019 · 5 comments
Open

Simple example #19

grero opened this issue Jan 10, 2019 · 5 comments

Comments

@grero
Copy link
Contributor

grero commented Jan 10, 2019

I realise this is not really actively developed anymore, but I was hoping there would be a simple example of how this package works. I was looking at the code in the test directory, and naively I thought that the following code should result in two non-overlapping circles.

using VennEuler
data = fill(false, 5,2)
data[[1,3,5],1] .= true
data[[2,4],2] .=true
labels = ["A","B"]
eo = make_euler_object(labels, data, EulerSpec())
(minf,minx,ret) = optimize(eo, random_state(eo,RNG), ftol=-1, xto      l=0.0025, maxtime=120, pop=1000)
render(joinpath("non_overlap.svg"), eo, minx)

However, I get the attached figure
non_overlap

This probably means that there is something I'm not understanding.

@HarlanH
Copy link
Collaborator

HarlanH commented Jan 11, 2019 via email

@grero
Copy link
Contributor Author

grero commented Jan 14, 2019

Thanks for getting back on this, I realise it was a shot in the dark : ) I was thinking of taking stab at bringing this up to date with 1.0 and perhaps hooking it up to Makie.jl for rendering. For now, I'm using this python package for making the above diagram matplotlib-venn which seems to work.

In [2]: import matplotlib_venn
In [3]: v = matplotlib_venn.venn2([set([1,3,5]), set([2,4])])

figure_1

Anyway, thanks again for taking the time to reply and I'll see what I can come up with.

@HarlanH
Copy link
Collaborator

HarlanH commented Jan 14, 2019 via email

@bjarthur
Copy link
Contributor

using sizesum=0.1 instead of the default 1.0 results in non-overlapping circles for the above example.

and, as of today, VennEuler.jl works with julia 0.7+ to include 1.0 and 1.2

@bjarthur
Copy link
Contributor

specifically, eo = make_euler_object(labels, data, EulerSpec(), sizesum=0.1).

and for 0.7+ you need to be on master. so ]dev VennEuler. i'd like to see better docs in the README before tagging a release.

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

No branches or pull requests

3 participants