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

node colores not showing when code is imported into another jupyter notebook #12

Open
joseberlines opened this issue Mar 23, 2020 · 1 comment
Labels
backlog Issues that haven't been categorized or are not yet ready for work bug Concrete, reproducible bugs

Comments

@joseberlines
Copy link
Contributor

joseberlines commented Mar 23, 2020

I have a function like this:

def graph_of_claims(claims): ... ... return graphwidget

when this function is run in a jupyter notebook with voila the nodes appear with the corresponding color

but:

when I import that function into another jupyter notebook
from pyutils import graph_of_claims as mygraph

and run voila the graph is shown without colours.

some idea?

@joseberlines
Copy link
Contributor Author

I was investigating this issue a bit an realised the following.

in the first case, i.e. the graph in a jupyter notebook visualised with voila the colors of the nodes are taken by the browser:

if claim['category'] == 'method':
g.setNode(claim['id'], style="fill: #f77")
if claim['category'] == 'apparatus':
g.setNode(claim['id'], style="fill: #7f7")
if claim['category'] == 'use':
g.setNode(claim['id'], style="fill: #7f7")

so when using inspector in google chrome the colors #f77, #7f7, #7f7 are to be seen.

This is not the case when importing a .py file containing the ipydagred3 into another jupyter. colors don't appear and indeed when inspecting the node elements the colors are all the same for all the nodes.

cheers

@timkpaine timkpaine added the bug Concrete, reproducible bugs label Apr 28, 2020
@timkpaine timkpaine added the backlog Issues that haven't been categorized or are not yet ready for work label Aug 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Issues that haven't been categorized or are not yet ready for work bug Concrete, reproducible bugs
Projects
None yet
Development

No branches or pull requests

2 participants