daft-dev / daft

Render probabilistic graphical models using matplotlib
https://docs.daft-pgm.org
MIT License
675 stars 118 forks source link

Any idea on why the arrows are penetrating the circles? #82

Closed ruzihao closed 5 years ago

ruzihao commented 8 years ago

Thanks for creating this helpful tool!

However, after I tried the example I got the graph a little bit different from the shown.

Do you have any idea on that?

image

davidwhogg commented 8 years ago

Looks like a plot line angle issue on the arrowheads.

Do you have anything in your matplotlibrc or .matplotlibrc or in an rcParams or etc?

ruzihao commented 8 years ago

No. I did do anything to matplotlibrc. Even after I upgrade matplotlib, I was not able to solve it.

Thanks again for your input though...

davidwhogg commented 8 years ago

And you just ran the example code directly? If so, I will try to reproduce.

ruzihao commented 8 years ago

Yes. Just copy and paste. It's kind of weird.

But I will take as it is though, not much big hurt. Thanks.

frnsys commented 8 years ago

You can pass in head_length=0.1 or some small-ish value when adding an edge as a workaround, i.e.:

pgm.add_edge('A', 'C', head_length=0.1)
ruzihao commented 8 years ago

Great! It is a good workaround.

BTW, it seems the param should be passed as follows: pgm.add_edge('A', 'C', plot_params={'head_length':0.1})

Thanks!

On Tue, Dec 8, 2015 at 4:46 PM, Francis Tseng notifications@github.com wrote:

You can pass in head_length=0.1 or some small-ish value when adding an edge as a workaround, i.e.:

pgm.add_edge('A', 'C', head_length=0.1)

— Reply to this email directly or view it on GitHub https://github.com/dfm/daft/issues/82#issuecomment-163027990.

Best, Hao Zhong Ph.D. Student in Management (Information Technology) Rutgers Business School