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

Support setting %graph_notebook_vis_options from variable #487

Merged
merged 3 commits into from
May 12, 2023

Conversation

michaelnchin
Copy link
Member

Issue #, if available: N/A

Description of changes:

  • Added the --store-to option to %graph_notebook_vis_options.
  • Added support for setting %graph_notebook_vis_options from the value of a local variable, via either cell variable injection or the new --load-from line argument.

Example usage

Define a JSON serializable dict or string variable with your vis settings:

vis_options_var = {"physics": {"disablePhysicsAfterInitialSimulation": True, "simulationDuration": 2000}}

Then use the variable to set %graph_notebook_vis_options via either:

  1. Cell magic variable
%%graph_notebook_vis_options
${vis_options_var}
  1. --load-from
%graph_notebook_vis_options --load-from vis_options_var

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@michaelnchin michaelnchin merged commit 95afff1 into main May 12, 2023
@michaelnchin michaelnchin deleted the vis-settings-from-var branch May 12, 2023 19:37
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

Successfully merging this pull request may close these issues.

1 participant