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

Label from attributes #173

Merged
merged 16 commits into from Jul 23, 2019
Merged

Label from attributes #173

merged 16 commits into from Jul 23, 2019

Conversation

ahuang11
Copy link
Collaborator

@ahuang11 ahuang11 commented Feb 20, 2019

#155
examples https://anaconda.org/ahuang11/test_attr_labels

image

I tried mimicking new line if label too long, but I don't think bokeh supports '\n'
image

I'm happy where it is now I think.

@philippjfr
Copy link
Member

Looks like this needs rebasing after the other two of your PRs were merged.

@ahuang11
Copy link
Collaborator Author

Okay, I think it's ready~
https://anaconda.org/ahuang11/test_attr_labels

hvplot/converter.py Outdated Show resolved Hide resolved
@ahuang11
Copy link
Collaborator Author

ahuang11 commented Feb 22, 2019

Initially, I tried inserting in self._redim; while it works for most plots, quadmesh fails for some reason:

From inspect:

Uncaught Error: attempted to retrieve property array for nonexistent field '4xDaily Air temperature at sigma level 995 [degK]'
    at e.t.array (eval at append_javascript (outputarea.js:762), <anonymous>:251:39519)
    at t.c.materialize_dataspecs (eval at append_javascript (outputarea.js:762), <anonymous>:251:26612)
    at e.t.set_data (eval at append_javascript (outputarea.js:762), <anonymous>:251:243846)
    at t.set_data (eval at append_javascript (outputarea.js:762), <anonymous>:251:391677)
    at t.initialize (eval at append_javascript (outputarea.js:762), <anonymous>:251:389891)
    at t [as constructor] (eval at append_javascript (outputarea.js:762), <anonymous>:251:93464)
    at t [as constructor] (eval at append_javascript (outputarea.js:762), <anonymous>:251:16974)
    at t [as constructor] (eval at append_javascript (outputarea.js:762), <anonymous>:251:399939)
    at new t (eval at append_javascript (outputarea.js:762), <anonymous>:251:388884)
    at Object.i.build_views (eval at append_javascript (outputarea.js:762), <anonymous>:251:13744)

@philippjfr
Copy link
Member

Hmm, that looks like the dimension name is becoming the complex string which shouldn't happen. I'll take a quick look in the morning.

@ahuang11
Copy link
Collaborator Author

Okay I'll push what I have. Also I don't understand what you mean by label and unit they should be separate attributes because if I separate them, the unit won't ever show?

@ahuang11
Copy link
Collaborator Author

ahuang11 commented Feb 22, 2019

Nevermind got it working with hv.Dimensions :)
https://anaconda.org/ahuang11/test_attr_labels

@jsignell
Copy link
Member

Just noticed this at the xgcm SciPy talk. Just to mention that it would be nice to land this.

@philippjfr
Copy link
Member

Just noticed this at the xgcm SciPy talk. Just to mention that it would be nice to land this.

Was working on this just yesterday, should land soon.

@jsignell
Copy link
Member

I noticed that right after I hit comment. Sorry for the noise :)

@philippjfr philippjfr merged commit 4685be2 into master Jul 23, 2019
@philippjfr philippjfr deleted the label_from_attrs branch May 1, 2020 17:39
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.

None yet

3 participants