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
I would like to overlay a boxwhisker plot with a scatterplot. When I create the scatter and boxwhisker plot separately, it's working fine. However, when I create an overlay, the width of the box (of the boxwhisker) is changing. It's getting very big.
Notice: it seems that the width of the box is dependent on the x-value of the x-axis.
Notice: I'm using bokeh as a backend.
I think when a scatter is added, the x-axis gets numerical values (not just categorical values) and the box width is adjusted to these numerical values which seems to be too big.
In the past this was working fine so I think it's a change in some recent holoviews or bokeh update.
Complete, minimal, self-contained example code that reproduces the issue
import pandas as pd
import holoviews as hv
df = pd.DataFrame({'x': [1,1,1,1],
'y': [2,3,4,5],
})
p1 = hv.Scatter(df, 'x', 'y')
p2 = hv.BoxWhisker(df, 'x', 'y')
p1*p2
# p2 returns a normal boxplot while p1*p2 has a boxplot where the box width is changed.
Screenshots or screencasts of the bug in action
p2:
p1*p2:
The text was updated successfully, but these errors were encountered:
When you first create a boxplot and overlay a scatter over it, the width of the boxplot is normal. So in previous example "p2*p1" does give a good result.
Again, it seems to be related to the x-axis being continuous vs being categorical.
The width of the boxplot also seems to depend on the x value. In the previous example: when x = 1, the total box_width is 10. When x = 5, the total width is about 40.
The box_width option for boxwhisker also doesn't seem to change the box_width anymore.
BMM3
changed the title
Overlay of BoxWhisker and Scatter increases box_width.
BoxWhisker with continuous x-axis breaks box_width.
Apr 17, 2024
ALL software version info
holoviews : 1.18.3
bokeh : 3.4.0
pandas : 2.2.1
Description
I would like to overlay a boxwhisker plot with a scatterplot. When I create the scatter and boxwhisker plot separately, it's working fine. However, when I create an overlay, the width of the box (of the boxwhisker) is changing. It's getting very big.
Notice: it seems that the width of the box is dependent on the x-value of the x-axis.
Notice: I'm using bokeh as a backend.
I think when a scatter is added, the x-axis gets numerical values (not just categorical values) and the box width is adjusted to these numerical values which seems to be too big.
In the past this was working fine so I think it's a change in some recent holoviews or bokeh update.
Complete, minimal, self-contained example code that reproduces the issue
Screenshots or screencasts of the bug in action
p2:
p1*p2:
The text was updated successfully, but these errors were encountered: