-
Notifications
You must be signed in to change notification settings - Fork 118
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
Added interactive mode #91
base: master
Are you sure you want to change the base?
Conversation
The horror! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any tutorial/user guide documentation on interactive drawing in this branch - what's the plan here? It looks like you are using the matplotlib gui, is that right? Will I be able to make interactive diagrams in a notebook?
All the examples can be run with pgm.render(interactive=True) in the Terminal. Good point about the notebook - I can add an example / tutorial. |
Cool, thanks! If you tweet it working interactively in mybinder I'll buy
you a kwak.
|
Quick update: I've added a notebook example (just the classic example but in a notebook) |
Interactive notebooks in Binder
Added docker file
Get more information at: `daft-pgm.org <http://daft-pgm.org>`_ | ||
Get more information at `daft-pgm.org <http://daft-pgm.org>`_ | ||
|
||
Try making some PGMs with the `example notebooks <http://mybinder.org:/repo/drphilmarshall/daft>`_ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ixkael If you know this is going to work, I guess we should change all these drphilmarshall
URLs to dfm
ones instead...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ixkael I still see drphilmarshall URLs... but you must be so close to that Kwak by now! :-)
trying default jupiter config
I’ve added a few functions to make possible the interactive modification of the graph once it is rendered. Just set pgm.render(interactive=True). All the demos work as usual. There are a few new classes and functions because I want to drag and drop Nodes and Plates only, with an automatic move of the labels and also the arrows. Finally, one can do print(pgm) to get the new positions of the Nodes/Plates.