Open GeoVizNow opened 1 year ago
Edited post: For the second chart where I want to lay out the kdim vertically the below example better illustrates what happens:
overlay_vertical = hv.Overlay([
hv.Curve((zs, y1), kdims='depth (kdim)', vdims='sl', label='s1').opts(ylim=(-2, 12), tools=['hover'], yaxis='right'),
hv.Curve((zs, y2), kdims='depth (kdim)', vdims='s2', label='s2').opts(ylim=(11,- 3), tools=['hover']), # , yaxis='right', toolbar='left'),
hv.Curve((zs, y3), kdims='depth (kdim)', vdims='s3', label='s3').opts(tools=['hover'])
])
overlay_vertical.opts(opts.Curve(multi_y=True, invert_xaxis=True, invert_axes=True), opts.Overlay(multi_y=True, frame_width=250, frame_height=850))
The following are changed compared to the figure where kdim is laid out horizontally:
It seems not all components are set up for swapping axes yet. I was kind of expecting 'multi_y' to mean multiple vdim axes, but maybe this is not what is intended. Also I am often confused about ylim and xlim. Is it the ylim before invert_axes that is used (which I think it is)?
I wonder if I am missing something or if this is a bug.
multi-axis has not been implemented for the x-axis, which is why you are seeing this weird behavior.
Thanks @Hoxbro, then I do understand. I would have loved it if this may some time becomes implemented for multiple x-axes. Not sure how far away though in time or complexity. For data such as log curve data in drilled wells it is very common to have several x-axes and to have one or more depth dimension(s) as y-axis. Also it is common to fill between two curves or between a curve and a constant. But the kdim is typically the y-axis reversed. The multi_y is anyways proving very useful already.
Should I close this one then?
I think we should repurpose this issue or create a new one about adding support for multi-axis in the x-direction.
@Hoxbro, please feel free to repurpose the issue if you can.
Thanks for making overlays with multiple y-axes become a possibility in holoviews! Amazing work and really helping. I was trying it out for 'holoviews.Curve' and see that it is very useful. It works really well when laying the kdim out horizontally. But in situations where the independent dimension is to be laid out vertically, e.g. wellbore data where depth is often expressed vertically, it does however not seem to work correctly when using the option 'invert_axes=True' to flip the vertical and horizontal axes.
ALL software version info
os: windows 10 enterprise ide: Jupyter notebook holoviews: version: 1.17.1 bokeh: version: 3.2.1
Description of expected behavior and the observed behavior
When swapping the axes using 'invert_axes=True' then the expectation is that what was multiple y-axes, becomes multiple x-axes, but still referring to vdims.
Complete, minimal, self-contained example code that reproduces the issue
Produces:
Modifying the code with 'invert_axes=True' produces: