I want to draw the following diagram. How can I draw this diagram?enter image description here

  • You can draw yourself your drawing with a simple tool named Mathcha.
    – Sebastiano
    Sep 11, 2021 at 18:42
  • Your question leaves all the effort to our community, even typing the essentials of a TeX document such as \documentclass{}...\begin{document} etc. As it is, most of our users will be very reluctant to touch your question, and you are left to the mercy of our procrastination team who are very few in number and very picky about selecting questions. You can improve your question by adding a minimal working example (MWE) that more users can copy/paste onto their systems to work on. If no hero takes the challenge we might have to close your question.
    – SebGlav
    Sep 11, 2021 at 19:51
  • You will find that other users are much more willing to help if you first make a real attempt. Most users will ignore this question because it looks like a "Please do this for me" question, which are not appropriate at TeX.SX. Show us what you've done so far. Provide a complete MWE that starts with \documentclass, includes all relevant \usepackage commands, ends with \end{document} and compiles without errors, even if it does not produce your desired output.
    – Sandy G
    Sep 11, 2021 at 19:52

1 Answer 1


You can tweak the following to your liking, it should be more than enough to get you started.


    node[circle,draw,text width=6em,align=center]    (main){main}
    (main.east)    ++(0.25,0) node[anchor=west]      (b)   {balance}
    (b.north west) ++(0, 0.1) node[anchor=south west](w)   {withdraw}
    (b.south west) ++(0,-0.1) node[anchor=north west](t)   {transfer}
    (w.north east)      ++(.5, .5) coordinate(rtl)
    (rtl|-t.south east) ++(.5,-.5) coordinate(rbr) rectangle (rtl)
    (rbr) -- node[below]{Wall} (rtl|-rbr)
    (rbr|-main) ++(2,0)
    node[circle,draw,text width=6em,align=center](data){bank Account data}
    (rtl)      ++(-1,0) node[anchor=south east,font=\bfseries]{Public}
    (rtl-|rbr) ++( 1,0) node[anchor=south west,font=\bfseries]{Private}
  \foreach\x in{b,w,t}
    \draw[->] (\x-|w.east) -- (\x-|data.west);

enter image description here

  • Thank you very much for your effort. Sep 12, 2021 at 7:47

You must log in to answer this question.

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