jluttine / tikz-bayesnet

TikZ library for drawing Bayesian networks, graphical models and (directed) factor graphs in LaTeX.
MIT License
829 stars 147 forks source link

Dashed lines option #5

Closed sachinruk closed 8 years ago

sachinruk commented 8 years ago

Hi,

I understand that this hasn't been updated for a while but wondering if there is a dashed line option for edges? For example to display a markov chain?

Thanks, p.s. This package has been extremely helpful for my papers/ thesis. Cheers!

jluttine commented 8 years ago

Hi!

The \edge command is defined as:

\newcommand{\edge}[3][]{ %
  % Connect all nodes #2 to all nodes #3.
  \foreach \x in {#2} { %
    \foreach \y in {#3} { %
      \path (\x) edge [->,#1] (\y) ;%
      %\draw[->,#1] (\x) -- (\y) ;%
    } ;
  } ;
}

So the command seems to pass the first argument to \path edge. Thus, does it work if you use \edge{dashed}{...}{...}? Or maybe some other TikZ style properties that are valid. I've tried to make this library such that you could modify all things easily by using TikZ in a normal way, so this the aim is that this or something similar should work. If this doesn't work, I have to take a closer look or ideas are welcome. I haven't used this package for a while and I'm not extremely familiar with TikZ so I'm a bit rusty. :)

jonathanjouty commented 8 years ago

The following works:

\edge[dashed] {from} {to}

I would close the issue :)