[pstricks] ayuda
Christoph Bersch
usenet at bersch.net
Fri Aug 22 10:53:13 CEST 2008
Victor Hugo Laura Marza schrieb:
> hola, quisiera que me ayuden hacer dibujos de grafos con latex para
> utilizar en cadenas de markov gracias
I do not speak spanish, but I understood the words 'cadenas de markov' ;-)
I have nothing to do with markov chains, I just looked it up in
wikipedia and found an example for the kind of graphs you probably mean:
http://de.wikipedia.org/wiki/Bild:Simple_markov_chain.svg
You can do this for example with psmatrix and the \nc* macros. The above
picture with PSTricks could look like this:
\documentclass{article}
\usepackage{pstricks-add}
\begin{document}
\begin{psmatrix}[mnode=circle,rowsep=2]
& $S_1$ \\
$S_2$ & & $S_3$
\end{psmatrix}
\psset{shortput=nab, ArrowInside=->, arrowscale=2}
\nccurve[ArrowInsidePos=.25,angleA=120,angleB=60,ncurv=10]{1,2}{1,2}^{$a_{11}$}
\nccurve[ArrowInsidePos=.25,angleA=-15,angleB=-75,ncurv=10]{2,3}{2,3}^[npos=.65]{$a_{33}$}
\nccurve[ArrowInsidePos=.25,angleA=-105,angleB=-170,ncurv=10]{2,1}{2,1}^[npos=.35]{$a_{22}$}
\ncarc{2,1}{1,2}^{$a_{21}$}
\ncarc{1,2}{2,3}^{$a_{13}$}
\ncarc[arcangle=12]{2,1}{2,3}^{$a_{23}$}
\ncarc[arcangle=12]{2,3}{2,1}^{$a_{32}$}
\end{document}
Hope this helps you constructing your own graphs,
Christoph
More information about the PSTricks
mailing list