Skip to content

Conversation

droumis
Copy link
Member

@droumis droumis commented Oct 22, 2024

Fixes #6416

Enabling subcoordinate_y should now apply the scalebar length relative to the subcoordinate_y range.

Code
import holoviews as hv
import numpy as np
import panel as pn
pn.extension()
hv.extension("bokeh")


common_opts = dict(subcoordinate_y=True, scalebar_unit=("cm", "m"), color="lightgrey")

curves = []
for i in range(10):
    curves.append(hv.Curve(np.random.rand(1000), label=f'c{i}').opts(**common_opts, scalebar=True if i == 5 else False))

curves = hv.Overlay(curves).opts(show_legend=False)

pn.panel(curves.opts(width=800, height=600)).servable()
image

@droumis droumis requested a review from hoxbro October 22, 2024 15:00
@hoxbro hoxbro added the type: enhancement Minor feature or improvement to an existing feature label Oct 22, 2024
@hoxbro hoxbro enabled auto-merge (squash) October 22, 2024 15:06
@hoxbro hoxbro merged commit 2e4979b into main Oct 22, 2024
14 of 16 checks passed
@hoxbro hoxbro deleted the scalebar_defaults branch October 22, 2024 15:30
Copy link

github-actions bot commented Feb 4, 2025

This pull request 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 Feb 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: ready type: enhancement Minor feature or improvement to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ScaleBar on subcoordinate_y is overflowing subcoordinate range
2 participants