0

I need to recreate this graph, with those shading on both sides of the curve, both with the line pattern down the curve, and the shading up the curve.

enter image description here

Note that both limits of the shading are not uniform lines.

Could you help me exactly recreate the jagged edges?

This is the code I was able to write

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz, pgfplots}
\usetikzlibrary{positioning,shapes,arrows,calc,intersections,pgfplots.fillbetween,patterns,patterns.meta,graphs,backgrounds,matrix,mindmap,decorations.markings,decorations.pathreplacing,decorations.pathmorphing}
\usepgfplotslibrary{fillbetween}
\begin{document}
\begin{tikzpicture}[scale=.7]
% Axis
\draw [->] (0,0) node [below] {0} -- (0,0) -- (5.5,0) node [below] {$x_1$};
\draw [->] (0,0) node [below] {0} -- (0,0) -- (0,5.5) node [above] {$x_2$};
% Indifference curve
\path[name path=A] (0.3,5) to [out=280,in=175] (5.5,0.5);
\path[draw,red,name path=B] (1,5) to [out=280,in=175] (5.5,1.2);
\path[name path=C] (1.6,5) to [out=280,in=175] (5.5,1.8);

\tikzfillbetween[of=A and B][pattern={Lines[angle=45,distance=6pt]}];
\tikzfillbetween[of=B and C]{balck, opacity=0.1};
%doesn't work
%\addplot [pattern={Lines[angle=45,distance=6pt]}] fill between[of=A and B];
\end{tikzpicture}
\end{document}

enter image description here

1 Answer 1

1

I could improve what I had done and I could get this

\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{tikz, pgfplots}
\usetikzlibrary{positioning,shapes,arrows,calc,intersections,pgfplots.fillbetween,patterns,patterns.meta,graphs,backgrounds,matrix,mindmap,decorations.markings,decorations.pathreplacing,decorations.pathmorphing}
\usepgfplotslibrary{fillbetween}
\begin{document}
\begin{tikzpicture}[scale=1]
\draw [-latex] (0,0) node [below] {0} -- (0,0) -- (5.5,0) node [below] {$x_1$};
\draw [-latex] (0,0) node [below] {0} -- (0,0) -- (0,5.5) node [left] {$x_2$};
\path[decorate,decoration={snake,segment length=20, amplitude = 0.8pt},name path=A] (0.3,5) to [out=280,in=175] (5.5,0.5);
\path[draw,thick,name path=B] (1,5) to [out=280,in=175] (5.5,1.2);
\path[decorate,decoration={snake, segment length=20, amplitude = 0.5pt},name path=C] (1.6,5) to [out=280,in=175] (5.5,1.8);
\node at (0,0) [black,above right]{$\lbrace y \in\mathbb{R}^2_+:x \succsim y\rbrace$};
\node at (2.5,4) [black,above right]{$\lbrace y \in\mathbb{R}^2_+:y \succsim x\rbrace$};
\node at (4,2.5) [black,right]{$\lbrace y \in\mathbb{R}^2_+:y \sim x\rbrace$};
\tikzfillbetween[of=A and B]{pattern={Lines[angle=45,distance=2pt, thick]}};
\tikzfillbetween[of=B and C]{balck, opacity=0.1};
\fill[black,circle,scale=0.3] [midway]B;
\end{tikzpicture}
\end{document}

enter image description here

however i can't get draw the "x" in the middle of curve, and neither can't draw the arrow from the label next to curve.

exist any other method to draw the curve with a sinuous line? I read a post Truncate tikz snake decoration without changing frequency that solution is to use a sin function, but I can't understand how it draw a curve whit that

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .