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

Direct plots and other objects using IPython protocol to notebook #1

Open
3 tasks
remram44 opened this issue Mar 12, 2018 · 4 comments
Open
3 tasks
Assignees
Labels
enhancement New feature or request

Comments

@remram44
Copy link
Member

remram44 commented Mar 12, 2018

TLDR %matplotlib inline for Vizier 😉

The "IPython protocol" is basically objects exposing _repr_html_(). IPython has a display() method that sends those to the notebook, and similarly does the same for the cell's "output" (last line).

To support everything that works in IPython:

  • Use _repr_html_() to format rich objects for the notebook
  • Need to make sure that calling IPython.display.display() sends objects to our frontend
  • Take the output from the last line of a Python cell and similarly run it through display()
  • Check how matplotlib works (do they just call display()?)
@remram44 remram44 added the enhancement New feature or request label Mar 12, 2018
@remram44 remram44 self-assigned this Mar 12, 2018
@okennedy
Copy link
Contributor

This seems like it might be overkill. Admittedly, if matplotlib exposes this functionality and we can just plug it in to Vizier, that's great. However, doesn't VisTrails already have workflow steps for plotting?

@remram44
Copy link
Member Author

Well we don't have to do all of this. Simply formatting "rich objects" by calling _repr_html_() should definitely be added since it is so easy.

Admittedly providing the IPython display() interface is a bit more involved, and might not be required, but I think that letting the users call matplotlib from their Python cells would be appreciated.

@okennedy
Copy link
Contributor

+1

@okennedy
Copy link
Contributor

@mrb24 Implemented something analogous to this already. Modulo documentation, perhaps this issue can be considered closed?

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

No branches or pull requests

2 participants