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

Pre-expand data and attributes in DataArray/Variable HTML repr? #4176

Closed
shoyer opened this issue Jun 24, 2020 · 7 comments · Fixed by #4182
Closed

Pre-expand data and attributes in DataArray/Variable HTML repr? #4176

shoyer opened this issue Jun 24, 2020 · 7 comments · Fixed by #4182

Comments

@shoyer
Copy link
Member

shoyer commented Jun 24, 2020

Proposal

Given that a major purpose for plotting an array is to look at data or attributes, I wonder if we should expand these sections by default?

  • I worry that clicking on icons to expand sections may not be easy to discover
  • This would also be consistent with the text repr, which shows these sections by default (the Dataset repr is already consistent by default between text and HTML already)

Context

Currently the HTML repr for DataArray/Variable looks like this:
image

To see array data, you have to click on the image icon:
image

(thanks to @max-sixty for making this a little bit more manageably sized in #3905!)

There's also a really nice repr for nested dask arrays:
image

@shoyer
Copy link
Member Author

shoyer commented Jun 26, 2020

@pydata/xarray any opinions here?

@dcherian
Copy link
Contributor

Looks great to me.

@benbovy
Copy link
Member

benbovy commented Jun 26, 2020

Looks good to me too. Perhaps it would be nice to add some more display options later, so that users will have more control on that?

shoyer added a commit that referenced this issue Jun 28, 2020
* Show data by default in HTML repr for DataArray

Fixes GH-4176

* add whats new for html repr

* fix test
@aarondewindt
Copy link

Is there a way to configure this? I would prefer the data and attributes to be collapsed in the project I'm currently working on.

@aarondewindt
Copy link

I had a look at the source, there isn't. I might look into implementing this if there is enough interest.

@dcherian
Copy link
Contributor

You could help finish up #4230

@aarondewindt
Copy link

Thanks, I'll have a look and see what I can do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants