Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Having seen some examples of electronic circuits, I would like to make an economic one like this one:

enter image description here

I haven't found any relevant example, so would like your help.

In case that somebody is interested in economics, a more representative circular flow is the following one: enter image description here

share|improve this question
    
My 2 cents: you could use gnuplot instead, but I think you could only get rectangles and straight lines. –  Luigi Jun 22 '13 at 18:13
3  
this will be very straight forward in tikz or pstricks- the example at the beginning of 3.1 of the pgf manual should get you started- it'd be great if you could try that, post your code, and then ask for help on any areas that you're stuck with :) –  cmhughes Jun 22 '13 at 18:15
4  
I seriously doubt circuitikz is of any help here, but it certainly is quite straightforward to do in tikz. –  Count Zero Jun 22 '13 at 18:26
1  
The other examples looks like something that can also be done in TikZ very easily. It is also possible to (ab)use tikz-cd for that … A \matrix or the positioning library are helpful tools. –  Qrrbrbirlbel Jun 23 '13 at 16:17

2 Answers 2

up vote 12 down vote accepted

The circuits library is not really suited for this kind of diagram.

This can easily be achieved with three nodes and a few edges. The shapes.geometric library provides the ellipse shape.

The auto=right option positions all nodes along a path on the right side (the default is left). The swap option changes this for only one node to the other side.

Code

\documentclass[tikz, convert=false]{standalone}
\usetikzlibrary{shapes.geometric}
\begin{document}
\begin{tikzpicture}[
  main node/.style={
    draw,
    shape=ellipse,
    minimum width=2cm,
    minimum height=1cm
  },
  >=latex,
  auto=right
]
  \node[main node] (daervz) {daervz};
  \node[main node] (y) at  (50:4) {y};
  \node[main node] (x) at (130:4) {x};

  \path[
    nodes={font=\scriptsize},
    ->
  ] (x)      edge[bend left=50]  node[swap] {Goods} (y)
             edge[bend right=50] node       {ddaf}  (daervz)
             edge[bend right=10] node[swap] {z}     (y)
    (daervz) edge[bend right=50] node       {dddda} (y)
             edge[bend left]     node       {dda}   (x)
    (y)      edge[bend left]     node       {dda}   (daervz)
             edge[bend left]     node       {k}     (x)
             edge[bend right]    node       {z}     (x)
  ;
\end{tikzpicture}
\end{document}

Output

enter image description here

share|improve this answer
    
thank you very much. –  giannis Jun 23 '13 at 7:14

With PSTricks. Just for fun!

\documentclass[preview,border={10pt 10pt 10pt 40pt}]{standalone}
\usepackage{pst-node}
\def\obj#1{\makebox[1cm]{\strut#1}}

\begin{document}
\offinterlineskip
\begin{psmatrix}[colsep=1cm,rowsep=3cm,mnode=oval]
    [name=l]\obj{x} & & [name=r]\obj{y}\\
        & [name=b]\obj{daervz} \\
\end{psmatrix}
\psset{arrows=->}
% upper connections
\ncarc[arcangle=40]{l}{r}\naput{Goods}
\ncarc[arcangle=-20]{r}{l}\nbput[labelsep=3pt]{z}
\ncarc[arcangle=-20]{l}{r}\naput{z}
\ncarc[arcangle=50]{r}{l}\nbput[labelsep=3pt]{k}
% left connections
\ncarc[arcangle=-50]{l}{b}\nbput{ddaf}
\ncarc[arcangle=20]{b}{l}\nbput{dda}
% right connections
\ncarc[arcangle=-50]{b}{r}\nbput{dddda}
\ncarc[arcangle=20]{r}{b}\nbput{dda}
\end{document}

enter image description here

Simplified version:

We can save more keystroke by using shortput=nab option as follows.

\documentclass[preview,border={10pt 10pt 10pt 40pt}]{standalone}
\usepackage{pst-node}
\def\obj#1{\makebox[1cm]{\strut#1}}

\begin{document}
\offinterlineskip
\begin{psmatrix}[colsep=1cm,rowsep=3cm,mnode=oval]
    [name=l]\obj{x} & & [name=r]\obj{y}\\
        & [name=b]\obj{daervz} \\
\end{psmatrix}
\psset{arrows=->,shortput=nab}
% upper connections
\ncarc[arcangle=40]{l}{r}^{Goods}
\ncarc[arcangle=-20]{r}{l}_[labelsep=3pt]{z}
\ncarc[arcangle=-20]{l}{r}^{z}
\ncarc[arcangle=50]{r}{l}_[labelsep=3pt]{k}
% left connections
\ncarc[arcangle=-50]{l}{b}_{ddaf}
\ncarc[arcangle=20]{b}{l}_{dda}
% right connections
\ncarc[arcangle=-50]{b}{r}_{dddda}
\ncarc[arcangle=20]{r}{b}_{dda}
\end{document}
share|improve this answer
    
It shows me an error: Undefined control sequence. <recently read> \c@lor@to@ps –  giannis Jun 22 '13 at 19:12
2  
@giannis: Compile it with latex-dvips-ps2pdf steps. –  cyanide-based food Jun 22 '13 at 19:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.