Here below is the proposal based on luadraw:
Example A
\documentclass[border=5pt]{standalone}
\usepackage{fourier-otf}
\usepackage{luadraw}
\begin{document}
\begin{luadraw}{name=fillarea}
local ld = luadraw
local g = ld.graph:new{
window={-2.5,2.5,-2.5,2.5,2,1},
size={8,10},margin=0.25
}
local pi,f = math.pi,math.atan
local h = function() return pi/2 end
g:Filloptions("full","red!30",0.3)
g:Linestyle("noline")
g:Ddomain2(f,h,{x={0,2}})
g:Lineoptions("dashed","black",4)
g:Filloptions("none",nil,1)
g:DlineEq(0,1,-pi/2)
g:DlineEq(0,1,pi/2)
g:Lineoptions("solid","black",6)
g:Dcartesian(f,{x={-2,2}})
g:Daxes({0,1,1},{labelpos={"none","none"},originpos={"none","none"},xyticks={0,0},legend={"$x$","$y$"},arrows="-Stealth"})
g:Show()
\end{luadraw}
\end{document}
Example B
\documentclass[border=5pt]{standalone}
\usepackage{fourier-otf}
\usepackage{luadraw}
\usepackage[svgnames]{xcolor}
\begin{document}
\begin{luadraw}{name=gradbox}
local ld = luadraw
local g = ld.graph:new{window={-5,4,-5.5,5},size={10,10}}
local i, pi = ld.cpx.I, math.pi
local h = function(x) return x^2/2-2 end
local f = function(x) return math.sin(3*x)+h(x) end
g:Dgradbox(
{-pi-4*i,pi+4*i,pi/3,1},
{
grid=true,originloc=0,
originnum={0,0},
labeltext={"\\pi",""},
labelden={3,1},
title="\\textbf{Title}",
legend={"Legend $x$","Legend $y$"}
}
)
g:Filloptions("full","blue",0.6); g:Linestyle("noline")
g:Ddomain2(f,h,{x={-pi/2,2*pi/3}})
g:Filloptions("none",nil,1); g:Lineoptions("solid",nil,8)
g:Dcartesian(h,{x={-pi,pi}, draw_options="DarkBlue"})
g:Dcartesian(f,{x={-pi,pi},draw_options="Crimson"})
g:Show()
\end{luadraw}
\end{document}
Example C
\documentclass[border=5pt]{standalone}
\usepackage{fourier-otf}
\usepackage{luadraw}
\usepackage[svgnames]{xcolor}
\begin{document}
\begin{luadraw}{name=implicit_inequalities}
local ld = luadraw
local cpx = ld.cpx
local Z = cpx.Z
local g = ld.graph:new{ window = {-3, 4, -3, 5}, size = {10, 10} }
local f1 = function(x,y) return -x*y+y^2-x^2-1 end
local f2 = function(x,y) return x^3-x-y^2+4 end
local filloptions = "draw=none,pattern= north west lines, pattern color=cyan"
g:Daxes( {0,1,1},{grid=true,gridstyle="dashed",xyticks={0,0},arrows="-Stealth"})
g:Dimplicit_inequalities(
{f1,'<',f2,">"},
{view={-2,5,-5,5}, draw_options=filloptions}
)
g:Dimplicit(f1, {draw_options="red,thick"})
g:Dimplicit(f2, {view={-2,5,-5,5}, draw_options="violet,thick"})
local eq = \luastringO{$\begin{cases}y^2-x^2-xy < 1\\ x^3-x+4 > y^2\end{cases}$}
g:Dlabel( eq, Z(2.25,1), {node_options="fill=white"})
g:Show()
\end{luadraw}
\end{document}
Example D
\documentclass[multi={luadraw},border=5pt]{standalone}
\usepackage[svgnames]{xcolor}
\usepackage{luadraw}
\usepackage{fourier-otf}
\begin{document}
\begin{luadraw}{name=implicit_inequalities1}
local ld = luadraw
local cpx = ld.cpx
local Z = cpx.Z
local g = ld.graph:new{ window = {-3, 4, -2, 6}, size = {10, 10} }
g:Daxes({0,1,1}, {grid=true, gridstyle = "dashed",arrows="-Stealth", legend={"$x$","$y$"}})
local f1 = function(x,y) return x^2 + y^2 - 2*x - 4*y - 4 end
local f2 = function(x,y) return y-math.sin(8*x) end
local f3 = function(x,y) return math.sin(8*x) end
local filloptions = "draw=none,pattern= north west lines, pattern color=cyan"
g:Dimplicit_inequalities( {f1,'<',f2,">"}, {grid={100,100}, draw_options=filloptions})
g:Dimplicit(f1, {draw_options="red,thick"})
g:Dcartesian(f3, {draw_options="blue"});
g:Show()
\end{luadraw}
\begin{luadraw}{name=implicit_inequalities2}
local ld = luadraw
local cpx = ld.cpx
local Z = cpx.Z
local g = ld.graph:new{ window = {-3, 4, -2, 6}, size = {10, 10} }
g:Daxes({0,1,1}, {grid=true, gridstyle = "dashed",arrows="-Stealth", legend={"$x$","$y$"}})
local f1 = function(x,y) return x^2 + y^2 - 2*x - 4*y - 4 end
local f2 = function(x,y) return y-math.sin(8*x) end
local f3 = function(x,y) return math.sin(8*x) end
local filloptions = "draw=none,pattern= north west lines, pattern color=cyan"
g:Dimplicit_inequalities( {f1,'<',f2,"<"}, {grid={100,100}, draw_options=filloptions})
g:Dimplicit(f1, {draw_options="red,thick"})
g:Dcartesian(f3, {draw_options="blue"});
g:Show()
\end{luadraw}
\end{document} 
















问 latex绘图填充区域颜色问题