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

Axis tick labels do not work with integer float locations #3583

Closed
SvenWarnke opened this issue Mar 27, 2019 · 8 comments
Closed

Axis tick labels do not work with integer float locations #3583

SvenWarnke opened this issue Mar 27, 2019 · 8 comments
Labels
type: bug Something isn't correct or isn't working

Comments

@SvenWarnke
Copy link

SvenWarnke commented Mar 27, 2019

If ticks are set with location and label, label is not used if location is a float that could be converted to integer.
Example:
import holoviews as hv
hv.extension('bokeh')
hv.Curve([(1, 2), (2, 2)]).options(yticks=[(1.3434, 'hi'), (2., 'ho')])
yields
image

whereas it is correctly displayed for integer position:
hv.Curve([(1, 2), (2, 2)]).options(yticks=[(1.3434, 'hi'), (2, 'ho')])
image

The same holds for xticks.

I have holoviews 1.11.3

@SvenWarnke SvenWarnke changed the title Supplying yticks labels does not work with integer float locations Axis tick labels do not work with integer float locations Mar 27, 2019
@philippjfr
Copy link
Member

That's bizarre, thanks for reporting this. I'm guessing this is an upstream issue in bokeh but will have to confirm.

@philippjfr philippjfr added the type: bug Something isn't correct or isn't working label Mar 28, 2019
@philippjfr
Copy link
Member

Yeah, pretty sure this is a bokeh issue, specifically because the ticks are specified as a dictionary, and in JS objects can only have string keys. Since the string representation of 2.0 in JS is "2" the lookup fails, because in Python the representation is "2.0".

@philippjfr
Copy link
Member

I'll work around this by casting floats that are ints to integers, but this should probably be fixed in bokeh as well.

@philippjfr philippjfr added this to the v1.12.0 milestone Mar 28, 2019
@Sieboldianus
Copy link

Sieboldianus commented Aug 25, 2021

Edited: I will add a new issue and reproducible example for my problem.

@MarcSkovMadsen
Copy link
Collaborator

MarcSkovMadsen commented Aug 25, 2021

Hi @Sieboldianus . Thanks for reporting. Please open a new issue. This one has been closed.

And please include a minimum, reproducible example that can run end to end. It will make it much easier for the volunteers and contributors that contribute in their limited spare time to understand, reproduce and fix. Thanks.

@Sieboldianus
Copy link

Yes, thank you. Already working on a minimum, reproducible example. Apologies for that.

@MarcSkovMadsen
Copy link
Collaborator

MarcSkovMadsen commented Aug 25, 2021

No problem. I'm just nudging here so that we can get the Philipp and his gang to focus their energy on fixing the issue instead of understanding, reproducing, making test examples etc. :-)

And again thanks for taking the time to contribute to making HoloViz better for all of us. A well described new issue is a "gift" to a project 👍

ps. screenshots and gifs make it even more clear what the issue is :-)

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 23, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: bug Something isn't correct or isn't working
Projects
None yet
Development

No branches or pull requests

4 participants