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

ylim does not work for a subcoordinates_y overlay #5952

Closed
1 task
droumis opened this issue Oct 24, 2023 · 2 comments · Fixed by #6190
Closed
1 task

ylim does not work for a subcoordinates_y overlay #5952

droumis opened this issue Oct 24, 2023 · 2 comments · Fixed by #6190

Comments

@droumis
Copy link
Member

droumis commented Oct 24, 2023

ALL software version info

(this library, plus any other relevant software, e.g. bokeh, python, notebook, OS, browser, etc)

show versions

Python : 3.11.6 | packaged by conda-forge | (main, Oct 3 2023, 10:37:07) [Clang 15.0.7 ]
Operating system : macOS-13.5.2-arm64-arm-64bit
Panel comms : default

holoviews : 1.18.0

bokeh : 3.3.0
colorcet : 3.0.1
cudf : -
dask : 2023.10.0
datashader : -
geoviews : -
hvplot : 0.9.0
ibis : -
IPython : 8.16.1
jupyter_bokeh : -
jupyterlab : 4.0.7
matplotlib : 3.8.0
networkx : 3.2
notebook : 7.0.6
numba : 0.57.1
numpy : 1.24.4
pandas : 2.1.1
panel : 1.3.0
param : 2.0.0
PIL : 10.1.0
plotly : -
pyarrow : 13.0.0
scipy : 1.11.3
skimage : 0.22.0
spatialpandas : -
streamz : -
xarray : 2023.10.1

Description of expected behavior and the observed behavior

With an overlay of curves with subcoordinate_y=True, each curve's subcoord y-axis is centered on integers in the underlying canvas axis (0,1,2..). My expected behavior was that setting ylim=(0,1) would display the center of the first curve axis until the center of the second. The observed behavior is that no y-limiting happens.

Complete, minimal, self-contained example code that reproduces the issue

import numpy as np
import holoviews as hv; hv.extension('bokeh')

# xlim works
xcurves = hv.Overlay([hv.Curve(np.random.rand(100), label=str(i)).opts(
    subcoordinate_y=True) for i in np.arange(10)]).opts(
    show_legend=False, xlim=(0,1))

# ylim does not work
ycurves = hv.Overlay([hv.Curve(np.random.rand(100), label=str(i)).opts(
    subcoordinate_y=True) for i in np.arange(10)]).opts(
    show_legend=False, ylim=(0,1))

Stack traceback and/or browser JavaScript console output

Screenshots or screencasts of the bug in action

#####Setting xlim
image

#####Setting ylim
image

  • I may be interested in making a pull request to address this
@droumis droumis added the TRIAGE Needs triaging label Oct 24, 2023
@droumis droumis added czi and removed TRIAGE Needs triaging labels Apr 2, 2024
@droumis droumis moved this to Todo in CZI R5 neuro Apr 2, 2024
@maximlt
Copy link
Member

maximlt commented Apr 15, 2024

Just a small comment.

each curve's subcoord y-axis is centered on integers in the underlying canvas axis (0,1,2..)

The underlying axis starts at subcoordinate_scale / 2. so by default at -0.5, not 0.

@maximlt maximlt moved this from Todo to WIP in CZI R5 neuro Apr 15, 2024
@droumis droumis moved this from WIP to Done in CZI R5 neuro Jun 23, 2024
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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants