You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description of expected behavior and the observed behavior
According to the docs, the styling option s is documented as:
s : int, optional, also available as 'size'
The size of the marker
But this is not true, as s and size are treated differently, at least for scatter and points plots. This becomes clear when trying to use a dim transform for the size. Granted, it does say int for the type, but given that this seems to work partially for some configurations, maybe this should be clarified/updated.
Complete, minimal, self-contained example code that reproduces the issue
importholoviewsashvimporthvplotimporthvplot.pandasimportnumpyasnpimportpandasaspdx=np.linspace(0.0, 10.0, 25)
y=np.sin(x)
df=pd.DataFrame({'x': x, 'y': y})
size_opts=dict(kind='scatter', size=hv.dim('y') *50.0)
s_opts=dict(kind='scatter', s=hv.dim('y') *50.0)
# run each of these in a separate cell in a notebook to see the errors and differences# bokeh: size works, s does not work# also, when s does not work, other hv.dim cannot be used and an warning is emitted (not thoroughly tested)hvplot.extension("bokeh")
(df.hvplot('x', 'y', **size_opts) +df.hvplot('x', 'y', **s_opts)).cols(1)
# matplotlib: size does not work, s workshvplot.extension("matplotlib")
(df.hvplot('x', 'y', **size_opts) +df.hvplot('x', 'y', **s_opts)).cols(1)
# plotly: size does not work at all and errors, s does not workhvplot.extension("plotly")
df.hvplot('x', 'y', **size_opts)
df.hvplot('x', 'y', **s_opts)
ALL software version info
(this library, plus any other relevant software, e.g. bokeh, python, notebook, OS, browser, etc should be added within the dropdown below.)
Software Version Info
Description of expected behavior and the observed behavior
According to the docs, the styling option
s
is documented as:But this is not true, as
s
andsize
are treated differently, at least forscatter
andpoints
plots. This becomes clear when trying to use a dim transform for the size. Granted, it does sayint
for the type, but given that this seems to work partially for some configurations, maybe this should be clarified/updated.Complete, minimal, self-contained example code that reproduces the issue
Stack traceback and/or browser JavaScript console output
Screenshots or screencasts of the bug in action
The text was updated successfully, but these errors were encountered: