issues: 639618568
This data as json
id | node_id | number | title | user | state | locked | assignee | milestone | comments | created_at | updated_at | closed_at | author_association | active_lock_reason | draft | pull_request | body | reactions | performed_via_github_app | state_reason | repo | type |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
639618568 | MDU6SXNzdWU2Mzk2MTg1Njg= | 4161 | Dark theme-friendly HTML Dataset and DataArray reprs for jupyter notebooks? | 19657652 | closed | 0 | 2 | 2020-06-16T12:18:23Z | 2020-06-17T18:33:58Z | 2020-06-17T18:33:58Z | NONE | Xarray's HTML The below example is from a jupyter notebook with the "onedork" dark theme from jupyter-themes. It results in black text against a dark background for the section headers (Coordinates, Dimensions, etc.) and DataArray data tables, and a light background for the coordinate and Dataset data tables. ```python Dataset reprimport numpy as np import xarray as xr ds = xr.Dataset( { 'temp': (('x', 'y'), np.random.rand(10, 20), {'long_name': 'temperature', 'units': 'degrees_Celsius'}), 'x': ('x', np.arange(10)), 'y': ('y', np.arange(20)), }, attrs={'description': 'example dataset'} ) ds ``` ```python DataArray reprds.temp ``` Note that, by contrast, the text repr is dark theme friendly: ```python Text reprxr.set_options(display_style='text') ds ``` VersionsJupyter versionsjupyter core : 4.6.3 jupyter-notebook : 6.0.3 qtconsole : 4.7.4 ipython : 7.15.0 ipykernel : 5.3.0 jupyter client : 6.1.3 jupyter lab : not installed nbconvert : 5.6.1 ipywidgets : 7.5.1 nbformat : 5.0.6 traitlets : 4.3.3Output of <tt>xr.show_versions()</tt>INSTALLED VERSIONS ------------------ commit: None python: 3.8.3 | packaged by conda-forge | (default, Jun 1 2020, 17:43:00) [GCC 7.5.0] python-bits: 64 OS: Linux OS-release: 3.10.0-957.27.2.el7.x86_64 machine: x86_64 processor: x86_64 byteorder: little LC_ALL: en_US.UTF-8 LANG: en_US.UTF-8 LOCALE: en_US.UTF-8 libhdf5: None libnetcdf: None xarray: 0.15.1 pandas: 1.0.4 numpy: 1.18.4 scipy: 1.4.1 netCDF4: None pydap: None h5netcdf: None h5py: None Nio: None zarr: None cftime: None nc_time_axis: None PseudoNetCDF: None rasterio: None cfgrib: None iris: None bottleneck: None dask: 2.17.2 distributed: 2.18.0 matplotlib: 3.2.1 cartopy: 0.18.0 seaborn: None numbagg: None setuptools: 47.1.1.post20200529 pip: 20.1.1 conda: 4.8.3 pytest: None IPython: 7.15.0 sphinx: None |
{ "url": "https://api.github.com/repos/pydata/xarray/issues/4161/reactions", "total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0 } |
completed | 13221727 | issue |