1

I need to a scheme like this one: enter image description here

The problem is, I have no idea how to do the dashed line on top of rectangle and the hatching in the left side and in the bottom.

Is it possible with Tikz?

3
  • definitely possible, you just need someone motivated enough to do it.... it'd be great if you could get that person started
    – cmhughes
    Commented Apr 25, 2016 at 15:24
  • 1
    You can use the patterns library by saying \usetikzlibrary{patterns}. Then you create a path with \pattern[pattern=north west lines] (x1,y1) -- (x2,y2) ... -- cycle which gets filled with the hatching. The dashed lines you simply create with \draw[dashed] (x1,y1) -- (x2,y2) -- ... Here (x,y) are the coordinates of the corners. Just try it and when you run into problems, edit your question to the specific problem.
    – JMP
    Commented Apr 25, 2016 at 15:44
  • Related: tex.stackexchange.com/questions/54464/…
    – Matsmath
    Commented Jul 12, 2016 at 21:30

3 Answers 3

2

Here is a starting point for you. Start to modify it to your needs and if you run into problems, edit your question and comment under this answer, so I get a notification. Then I am going to help you further:

\documentclass[tikz, border=2mm]{standalone}
\usetikzlibrary{patterns}
%
\begin{document}
%
\begin{tikzpicture}
%
    \pattern[pattern=north east lines] (0,0)--(0,1)--(1,1)--(1,0)--cycle;
    \draw[dashed] (0,2) -- (1,2);
%
\end{tikzpicture}%
%
\end{document}

enter image description here

2
  • How is this an answer?
    – Matsmath
    Commented Jul 12, 2016 at 21:29
  • @Matsmath It's a starting point for the OP.
    – Karlo
    Commented Jul 13, 2016 at 9:41
1

This could be a good starting point.

\documentclass{standalone}                                          

\usepackage{tikz}                                                   
\usetikzlibrary{patterns, decorations.pathreplacing, calc}          

\begin{document}                                                    

\renewcommand{\b}{10}                                               
\newcommand{\h}{5}                                                  
\renewcommand{\t}{.5}                                               

\begin{tikzpicture}                                                 
  \coordinate (O) at (0,0);                                         
  \coordinate (E) at (\b,0);                                        
  \coordinate (En) at (\b,\t);                                      
  \coordinate (One) at (\t,\t);                                     
  \coordinate (Ne) at (\t,\h);                                      
  \coordinate (N) at (0,\h);                                        
  \coordinate (NE) at (N -| E);                                     
  \draw[thick, pattern=north east lines] (O) -- (E) -- (En) -- (One) -- (Ne) -- (N) -- cycle;
  \draw[thick] (En) -- (NE);                                        
  \draw[dashed] (Ne) -- (NE);                                       
  \draw[thick, decorate, decoration={brace, raise=20pt}] (NE) -- (E) node[midway, right=30pt] {text};                                               
  \draw[thick, decorate, decoration={brace, raise=20pt, mirror}] (O) -- (E) node[midway, below=30pt] {text}; 
\end{tikzpicture}                                                   

\end{document}
1

Another starting point

\documentclass[tikz,border=2mm]{standalone}
\usetikzlibrary{patterns}

\begin{document}
\begin{tikzpicture}
    \draw[pattern=north west lines] (0,0)-|(3,.5)-|(0.5,2)-|cycle;
    \draw[dashed] (0,2)--(3,2);
    \draw (3,0)--(3,2);
\end{tikzpicture}
\end{document}

enter image description here

You must log in to answer this question.

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