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)