Area or Spread along the y axis

Hi,

Is there a way to use hv.Area or hv.Spread to plot an area along the y axis. In the example given on the documentation website, it is only along the x axis.
https://holoviews.org/reference/elements/bokeh/Spread.html#elements-bokeh-gallery-spread

https://holoviews.org/reference/elements/bokeh/Area.html#elements-bokeh-gallery-area

Basically what I am trying to achieve is this:

But I can only make it work along the X axis so far:

import holoviews as hv
import numpy as np

hv.extension('bokeh')

Y  = np.linspace(0,3,200)
X = Y**2 + 3
X2 = np.exp(Y) + 2
hv.Area((X, X2, Y), vdims=["X", "X2"])

and it gives:

Turned out it was quite easy, the option invert_axes=True shall be used:

import holoviews as hv
import numpy as np

hv.extension('bokeh')

Y  = np.linspace(0,3,200)
X = Y**2 + 3
X2 = np.exp(Y) + 2
hv.Area((X, X2, Y), vdims=["X", "X2"]).opts(invert_yaxis=True, invert_axes=True, xaxis="top")

2 Likes