Re: un albero con tikz

#94758
claudio
Partecipante
    Up
    0
    Down
    ::


    altra soluzione
    `
    \documentclass{article}
    \usepackage[utf8]{inputenc}
    \usepackage{tkz-graph}
    \usetikzlibrary{arrows}
    \thispagestyle{empty}
    \begin{document}
    \begin{center}
    \begin{tikzpicture}[>=latex']
    \tikzset{VertexStyle/.style = {
    shape = rectangle,
    inner sep = 0pt,
    outer sep = 0pt,
    minimum size = 50pt,
    draw}}
    \SetGraphUnit{4}
    \Vertex[L=A]{P}
    \NOEA[L=B](P){M}
    \EA[L=C](P){D}
    \SOEA[L=D](M){C}
    \tikzset{EdgeStyle/.style={->}}
    \Edge[label=1](P)(M)
    \Edge[label=1](P)(D)
    \Edge[label=2](M)(C)
    \Edge[label=2](D)(C)
    \end{tikzpicture}
    \end{center}
    \end{document}
    `
    difetto di questa soluzione
    definire shape diverse da usare contemporaneamente
    è un tantino rognoso se si può dire
    ciao
    claudio

    Go to top