I have a code from previous forum, it is a reflection toward x axis, then I want to reflect my curve toward y axis, but I am unable to do so, this is the code:
using Plots, LaTeXStrings, Plots.PlotMeasures
gr()
function make_fg_plot()
g(x) = x^3
xreflection = x -> -x
xtransform = xreflection
plt = plot(; xtick=:false, ylims = (-1, 6),
legend = :topleft, label = "", bottom_margin=10mm)
for (T, attrs) in [(xtransform, (;label = "", linecolor = :green)),
(identity, (;label = "", linecolor = :green))]
plot!(plt, T ∘ g, 0, 4; label="") # Plot g and define the interval of existence
end
return plt
end
make_fg_plot()
the reflection of the curve should appear on the left side, looks like x^{2}