# How to Fill Horizontal Slicing under a Curve?

Hi all,

this is only a simple fix needed, I want to fill an area like this image: I try but it created a square fill, I want the horizontal slicing to follow the shape of the curve. Can it be done?

using Plots, LaTeXStrings, Plots.PlotMeasures
gr()

# For the curve
f(x) = x^3

plt = plot(;xtick=0:1:2, xlims=(-2,2), ylims = (0, 5),
legend = :topright, framestyle=:zerolines, label = "", bottom_margin=10mm)
a= π/2

# Plotting time
plot(plt, f, 0, a, label="")

# First filling
plot!(f, 0,2.5,
fillrange = 20, fillalpha = 0.25, c = 1,
label = "")

# Second filing
plot!([0,f(1)], [1.5, 1.5],
fillrange = 1, fillalpha = 0.35, c = 1,
label = "", linewidth = 0)



Yes, I managed to make it manually,

but it would be better if there is a function or a method so I can fill horizontal slicing easily for any kind of graphs.

using Plots, LaTeXStrings, Plots.PlotMeasures
gr()

# For the curve
f(x) = x^3

plt = plot(;xtick=0:1:2, xlims=(-2,2), ylims = (0, 5),
legend = :topright, framestyle=:zerolines, label = "", bottom_margin=10mm)
a= π/2

# Plotting time

plot(f, ylims= (0,13), xlims=(0,6),
ytick=true, xtick=true, framestyle=:zerolines,
legend=:topright, bottom_margin=5mm,
label=L"f(x) = x^{3}",
size=(720, 360), tickfontsize=10)

# First filling
plot!(f, 0,4.5,
fillrange = 20, fillalpha = 0.35, c = 1,
label = "")

# Second filling
# Fill from x=1.1 to x=1.4 with lower bound will be f and the height is fillrange
plot!(f,1.1,1.4,
fillrange = 2.8, fillalpha = 0.65, c = 1,
label = L"\sqrt{y}")

# Fill from (0,f(1.1) to (1.1,f(1.1))
# with the height is fillrange
plot!([0,1.1], [f(1.1), f(1.1)],
fillrange = f(1.41), fillalpha = 0.65, c = 1,
label = "", linewidth = 0)

annotate!([(1.5,2.3, (L"△y", 10, :black))])