2

I want to plot the below figure. What must I do in Latex?

Is there an Editor as LaTable to design this figure?

enter image description here

AboAmmar
  • 46,352
  • 4
  • 58
  • 127
Nima
  • 139

1 Answers1

3

Just for fun, the left figure.

I hope you will try to understand the commented code.

\documentclass[tikz,border=2mm]{standalone} 
\usetikzlibrary{positioning, patterns, arrows.meta, bending}
\usepackage{mathtools}
\usepackage{lmodern}

\begin{document}
\begin{tikzpicture}[>={Stealth[bend, length=5pt]}]

%Outer square
\node[minimum size=2cm, draw, inner sep=0pt, outer sep=0pt] (A) {};

%Dashed square
\node[minimum size=1cm, draw, pattern = north west lines, draw, anchor=north west, inner sep=0pt, outer sep=0pt] (a) {};

%North trapezium
\filldraw[fill=blue!15, line join=bevel] (A.north west)-|(a.north east)--(a.north west)--cycle;

%blue vertical line and label
\draw[line width=2mm, blue!30] (a.north west)--(a.south west) node[below, black]{$k$};

%two white little squares
\node[draw, fill=white, minimum size=2mm, inner sep=0pt, outer sep=0pt] at (a.north west)(b1) {};

\node[draw, fill=white, minimum size=2mm, inner sep=0pt, outer sep=0pt] at ([yshift=-7mm]a.north west) (b2) {};

%dashed lines and labels
\draw[dashed] (b1)--(b1-|A.west) node [left] (k) {$k$};

\draw[dashed] (b2)--(b2-|A.west) node [left] (r) {$\overline{r}$};

%Big 0 at dashed lines area center
\path (k)-- node[font=\Large] {$0$} (b2);

%Curved line
\path (k.west) edge[<->, bend right=45] (r.west);
\end{tikzpicture}
\end{document}

enter image description here

Ignasi
  • 136,588