![realisierbare Region](https://rvso.com/image/472714/realisierbare%20Region.png)
Ich möchte den möglichen Bereich darstellen. Aber ich weiß nicht wie. Ich brauche eine Anleitung.
\documentclass[tikz, border=5mm]{standalone}
\begin{document}
\begin{tikzpicture}
\draw[gray!50, thin, step=0.5] (-1,-3) grid (5,4);
\draw[very thick,->] (-1,0) -- (5.2,0) node[right] {$x_1$};
\draw[very thick,->] (0,-3) -- (0,4.2) node[above] {$x_2$};
\foreach \x in {-1,...,5} \draw (\x,0.05) -- (\x,-0.05) node[below] {\tiny\x};
\foreach \y in {-3,...,4} \draw (-0.05,\y) -- (0.05,\y) node[right] {\tiny\y};
\draw (-1,-3) -- node[above,sloped] {\tiny$x_1=-1$} (-1,3);
\draw (0,0) -- node[above,sloped] {\tiny$x_1\leq x_2$} (3,3);
\draw (0,0) -- node[above,sloped] {\tiny$x_1\leq x_2$} (3,-3);
\draw (-1,3) -- node[above,sloped] {\tiny$x_2=3$} (3,3);
\draw (-1,3) -- node[above,sloped] {\tiny$x_2=-3$} (3,3);
\end{tikzpicture}
\end{document}
Aktuelles Ergebnis:
Antwort1
Ich bin nicht sicher, wie das Ergebnis genau aussehen soll, aber vielleicht hilft Ihnen das.
Wenn Sie einen Bereich zeichnen möchten, sollten Sie die Linien verbinden, die die Grenzen dieses Bereichs darstellen. Andernfalls erhalten Sie nur einzelne Linien, die nicht verbunden sind. Wenn der Bereich Teile des Diagramms nicht abdecken soll, sollten Sie ihn außerdem vor den Dingen platzieren, die er nicht abdecken soll:
\documentclass[tikz, border=10pt]{standalone}
\begin{document}
\begin{tikzpicture}
\draw[gray!50, thin, step=0.5] (-1,-3) grid (5,4);
\draw[fill=gray!10]
(-1,-3)
-- node[above, sloped] {\tiny$x_1=-1$} (-1,3)
-- node[above, sloped] {\tiny$x_2=3$} (3,3)
-- node[above, sloped] {\tiny$x_1\leq x_2$} (0,0)
-- node[above, sloped] {\tiny$x_1\leq -x_2$} (3,-3)
-- node[above, sloped] {\tiny$x_2=-3$} cycle;
\draw[very thick, ->] (-1,0) -- (5.2,0) node[right] {$x_1$};
\draw[very thick, ->] (0,-3) -- (0,4.2) node[above] {$x_2$};
\foreach \x in {-1,...,5}
\draw (\x,0.05) -- (\x,-0.05)
\ifnum\x=0\relax
node[below right] {\tiny\x}
\else
node[below] {\tiny\x}
\fi ;
\foreach \y in {-3,...,4}
\draw (-0.05,\y) -- (0.05,\y)
\ifnum\y=0\else
node[right] {\tiny\y}
\fi ;
\draw[very thick, <->]
(0:2) arc[start angle=0, end angle=45, radius=2]
node[midway, right] {\tiny$q$};
\node[align=center] at (3,-2) {unstable \\ region};
\node[align=center] at (1,-2) {stable \\ region};
\end{tikzpicture}
\end{document}
Wenn die meisten Beschriftungen und das Raster entfernt sind, ähnelt es eher dem Bild, das Sie zeigen:
\documentclass[tikz, border=10pt]{standalone}
\begin{document}
\begin{tikzpicture}
\draw[fill=gray!10]
(-1,-3) -- (-1,3) -- (3,3) -- (0,0) -- (3,-3) -- cycle;
\draw[very thick, ->] (-1,0) -- (3,0) node[right] {$x_1$};
\draw[very thick, ->] (0,-3) -- (0,3.5) node[above] {$x_2$};
\draw[very thick, <->]
(0:2) arc[start angle=0, end angle=45, radius=2]
node[midway, right] {$q$};
\node[align=center] at (3,-2) {unstable \\ region};
\node[align=center] at (1,-2) {stable \\ region};
\end{tikzpicture}
\end{document}