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

Setting colorbar ticks #565

Closed
vascotenner opened this issue Mar 23, 2016 · 3 comments
Closed

Setting colorbar ticks #565

vascotenner opened this issue Mar 23, 2016 · 3 comments
Labels
tag: component: plotting type: bug Something isn't correct or isn't working
Milestone

Comments

@vascotenner
Copy link
Contributor

I tried to set the number of ticks on a colorbar, using the mpl backend:

%%opts Image [colorbar=True, cbar_ticks=5]
hv.Image(np.array([[1,.5],[0,.9]]))

This raises in the following error:

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
/home/tenner/.local/lib/python2.7/site-packages/IPython/core/formatters.pyc in __call__(self, obj)
    337                 pass
    338             else:
--> 339                 return printer(obj)
    340             # Finally look for special method names
    341             method = _safe_get_formatter_method(obj, self.print_method)

/home/tenner/src/holoviews/holoviews/ipython/display_hooks.pyc in pprint_display(obj)
    222     if not ip.display_formatter.formatters['text/plain'].pprint:
    223         return None
--> 224     return display(obj, raw=True)
    225 
    226 

/home/tenner/src/holoviews/holoviews/ipython/display_hooks.pyc in display(obj, raw, **kwargs)
    204         html = grid_display(obj)
    205     elif isinstance(obj, (CompositeOverlay, ViewableElement)):
--> 206         html = element_display(obj)
    207     elif isinstance(obj, (Layout, NdLayout, AdjointLayout)):
    208         html = layout_display(obj)

/home/tenner/src/holoviews/holoviews/ipython/display_hooks.pyc in wrapped(element)
    136                        'Call ipython.show_traceback() for details')
    137                 return msg % e
--> 138             raise e
    139 
    140     return wrapped

AttributeError: Colorbar instance has no attribute 'set_major_locator'
@philippjfr
Copy link
Member

Thanks, will look into it.

@philippjfr philippjfr added type: bug Something isn't correct or isn't working tag: component: plotting labels Apr 29, 2016
@philippjfr philippjfr added this to the v1.6.0 milestone Apr 29, 2016
@philippjfr
Copy link
Member

Fixed in the PR referenced above, closing.

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 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
tag: component: plotting type: bug Something isn't correct or isn't working
Projects
None yet
Development

No branches or pull requests

2 participants