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

Add _repr_html_ for Iris cubes #2918

Merged
merged 11 commits into from
May 31, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
* Added ``repr_html`` functionality to the :class:`~iris.cube.Cube` to provide
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We will want this to have a screenshot when it comes to cutting the release.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could use the image above?

a rich html representation of cubes in Jupyter notebooks.
2 changes: 1 addition & 1 deletion lib/iris/cube.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@
import iris.coord_systems
import iris.coords
import iris.exceptions
from iris.experimental.representation import CubeRepresentation
import iris.util


Expand Down Expand Up @@ -2066,6 +2065,7 @@ def __repr__(self):
name_padding=1)

def _repr_html_(self):
from iris.experimental.representation import CubeRepresentation
representer = CubeRepresentation(self)
return representer.repr_html()

Expand Down