I need to draw a picture, the picture is showed below. Which package is better to draw it,TikZ? Actually I need integrate the latex code into my software program, and the input, output and variable are changeable according to the parameters in the program, for instance, if there are only two input parameter, then the picture just show two inputs. And the Legend part, since it is fixed, may be used as an attachment?

The program part I can think about it, but how to draw the picture in latex is really a challenge for me, anyone can help?

How to draw the black color arrow sign?(RTDB variable)

enter image description here

I try to use pifont package for the little black arrow. I checked \ding{253} is the one i want, but when i use it in my latex code, it showed like a fishbone, do you know what is the problem?

Rectangle labeled "CDMS::ALDS" with 5 inputs, 2 outputs, and 5 variables

  • 3
    Welcome to TeX.SX! An extensive manual for TikZ is available on TeXdoc and it also comes with some TeX distributions by using e.g. texdoc tikz in the command line (works for a lot of packages). Have you given that a look yet?
    – 1010011010
    Aug 21, 2014 at 11:48
  • 1
    You also can make such a drawing with pstricks and more specifically with pst-node.
    – Bernard
    Aug 21, 2014 at 12:02
  • The legend could be a separate picture, or at least put it into a \begin{scope} \end{scope} so you can move it around as a unit. Aug 21, 2014 at 14:09

1 Answer 1


This is an attempts where pics skill is used, requiring tikz 3.0

enter image description here


\tikzset{myarrow/.pic = {
\draw[fill=black] (-0.5,0) -- (0,0.5)--(0.5,0)--(0.5,1)--
(0,1.5)--(-0.5,1)--(-0.5,0) ;
\draw[fill=black,inner sep=0.7pt] circle(5pt);},
\draw[fill=black,inner sep=0.7pt] ellipse (1em and 0.5em);},
\draw[very thick,inner sep=0.7pt] ellipse (1em and 0.5em);},
rec/.style={draw,minimum height=3em,minimum width=15em,fill=yellow},

\draw (0,0) rectangle (6,6);
\node[] at (3,3) {CMDA::ALDS};

% draw myarrows on the left side
\foreach \i [count=\j from 1] in {5,4,3,2,1} {
\pic () at (-0.5,\i) {myarrow};
\node[xshift=-2cm] at (-1,\i) {input\j};

% draw mydots at bottom
\foreach \i [count=\j from 1] in {5,4,3,2,1} {
\pic (b\i) at (\i,0) {mydot};
\draw[] (\j,0)--(\j,-\i)node[right] {variable\j};

% draw myarrows on the right
\foreach \i [count=\j from 1] in {5,4} {
\pic () at (5.5,\i) {myarrow};
\node[xshift=2cm] at (6,\i) {output\j};

\node[rec] (L) at (11,2){Ledgend};
\node[rec,below=0.1cm of L](L1){RTDB variable};
\node[rec,below=0.1cm of L1](L2) {in all variants};
\node[rec,below=0.1cm of L2](L3){in some variants};
\node[rec,below=0.1cm of L3](L4) {XP variable};
\pic[xshift=-2.3cm] at (L1) {myarrow};
\pic[xshift=-2.cm] at (L2) {myelliB};
\pic[xshift=-2.cm] at (L3) {myelli};
\pic[xshift=-2.cm] at (L4) {mydot};
  • Thanks a lot, you are my hero!!! I am learning how to draw it, and tried to use \ding{253} for the little black arrow, but it showed like a fishbone, do you what is the problem? I attached a picture in question. Anyway,it is an extra question, just take a look if you have time.
    – postit
    Aug 21, 2014 at 15:36
  • @postit -- I also got the fish-bone-like arrow for ding{253}. If that fish-like arrow is what you need. You can actually modify the myarrow code which is nothing but code connecting 6 (symmetric w.r.t y axis) coordinates to obtain a fish-like arrow. Just draw the sketch on x-y plane and identify the coordinates.
    – Jesse
    Aug 21, 2014 at 16:09
  • @Jesse: I am just curious...how long did it take for you, Jesse? :-) Aug 21, 2014 at 16:12
  • This one, about 40 minutes. Maybe a bit longer. Sometimes, knowing what to draw but just won't work, you know :)--.
    – Jesse
    Aug 21, 2014 at 16:35

You must log in to answer this question.

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