1

In my graph drawing algorithm (written in Lua for LuaLaTeX), I'd like to change a solid line to a dashed line. I use a Digraph with some vertices and arcs between them. On page 499 of the Tikz & PGF manual, it talks about a field generated_options that an Arc has. The generated_options will be passed to its edges, which in turn will be passed down to the display layer. I thought it would be as simple as:

arc.generated_options = {{key = "dashed", value="true"}}

But this doesn't do anything. What am I missing here?

I can make the line dashed in the \graph:

(the tree layout is used here, but I'm using my own layout)

\documentclass[11pt,a4paper]{article}
\usepackage{tikz}
\usetikzlibrary{graphs,graphdrawing}
\usegdlibrary{trees}

\begin{document}
\begin{tikzpicture}[tree layout]
\graph{
  "Start"[rectangle, draw] --[dashed]
  "End"[rectangle, draw]
};
\end{tikzpicture}
\end{document}

but I'd like my Lua algorithm to change it to dashed instead. Does anyone know how to do this?

Your Answer

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

Browse other questions tagged or ask your own question.