I'm drawing a sequencediagram
with LaTeX. By now it looks like this:
- Is it possible to remove the grey boxes?
- Is it possible to put a space between handshake and
ws.connect
?
This is my Code:
\begin{figure}[hbtp!]
\begin{center}
\fbox{
\begin{sequencediagram}
\newthread{c}{:Client}
\newinst[4]{s}{:Server}
\begin{call}
{c}{Handshake}
{s}{Handshake}
\end{call}
\begin{call}
{c}{ws.connect}
{s}{ws.connectes}
\end{call}
\mess{c}{ws.message}{s}
\mess{s}{ws.message}{c}
\mess{c}{ws.message}{s}
\end{sequencediagram}
}
\caption{WebSockets}
\end{center}
\end{figure}
Best Answer
Looking at
pgf-umlsd.sty
is not so difficult to find that by default, allthreads
are filled withgray!30
. But being an optional parameter you can change it just declaring which color do you prefer:\newthread[white]{c}{:Client}
. I've selected white becausenone
draws transparentthreads
which don't cover the background dotted line.Second question was more difficult because all call/message positions are based on several internal counters and harcoded factors. The best solution I could find was to
step up
the counter which places every call:\stepcounter{seqlevel}
.