hvplot icon indicating copy to clipboard operation
hvplot copied to clipboard

xoffset works in .opts but not as kwarg.

Open LinuxIsCool opened this issue 4 years ago • 1 comments

I'm using hvplot.labels. The options for this seem quite finicky and under documented.

ALL software version info

hvplot '0.7.0' holoviews '1.14.1'

Description of expected behavior and the observed behavior

This does not work:

df.hvplot.labels(x='Month', y='value', text='label', text_font_size='6pt', text_color='blue', xoffset=20)

This works:

df.hvplot.labels(x='Month', y='value', text='label', text_font_size='6pt', text_color='blue').opts(xoffset=20)

Also, in terms of changing the size and color of the labels, no amount of kwargs or opts seemed to work until I found this page and started passing the bokeh option names directly https://docs.bokeh.org/en/latest/docs/user_guide/styling.html#creating-custom-themes

Also, why does hvplot change the bokeh x_offset to xoffset? Wouldn't there be higher discoverability if the option names remained the same across the ecosystem? Maybe this is a silly question.

I guess my main point is that his page is under-documented: https://hvplot.holoviz.org/reference/pandas/labels.html

LinuxIsCool avatar Mar 14 '21 20:03 LinuxIsCool

I can reproduce the original issue.

Also, why does hvplot change the bokeh x_offset to xoffset? Wouldn't there be higher discoverability if the option names remained the same across the ecosystem? Maybe this is a silly question.

I think actually HoloViews/xoffset and Bokeh/x_offset are expressed in different units (coordinates vs. screen units) so it's probably better they have different names!

maximlt avatar Oct 21 '22 04:10 maximlt