5

I created a sequence diagram with tikz-uml and I would like to reduce the distance between the involved entities.

I currently have:

\begin{tikzpicture}
\begin{umlseqdiag}
% Entities required for interaction
\umlactor[class=User]{user}
\umlobject[class=App]{app}
\umlobject[class=Script]{api}
\umlobject[class=Controller]{sessionCtrl}
% User creates a session
\begin{umlcall}[op=create(name), type=synchron, return=sessionView]{user}{app}
  % App posts session data to server
  \begin{umlcall}[op=create(name), type=synchron, return=sessionId]{app}{api}
    \begin{umlcall}[op=create(name), type=synchron, return=session]{api}{sessionCtrl}
    \end{umlcall}
  \end{umlcall}
  % App navigates to new session
  \begin{umlcall}[op=open(id), type=synchron, return=session]{app}{api}
  \end{umlcall}
\end{umlcall}
\end{umlseqdiag}
\end{tikzpicture}

and it creates the following the result:

Result

How can I reduce the distance between the objects to make it fit the page?

  • 1
    Great first question! A warm welcome to TeX.SE! – A Feldman Jun 16 '16 at 21:40
2

Been struggling with that, you can define the x coordinate like this:

\umlobject[x=12, class=Controller]{sessionCtrl}

Use option x on the object you are creating, that will do the trick!

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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