- Questo topic ha 4 risposte, 3 partecipanti ed è stato aggiornato l'ultima volta 10 anni, 7 mesi fa da
claudia.
-
CreatoreTopic
-
9 Febbraio 2016 alle 17:45 #105020::
Salve a tutti! Vorrei chiedervi un consiglio: avrei bisogno di disegnare un albero binomiale di questo tipo, con ad ogni nodo più di un’informazione (su più righe). Qual è il pacchetto migliore da utilizzare?[attachment=1530]PyQmN.png[/attachment]
Grazie mille
Attachments:
You must be logged in to view attached files. -
CreatoreTopic
-
AutoreRisposte
-
-
10 Febbraio 2016 alle 7:23 #105021::
Ciao.
Un pacchetto come Tikz/PGF ti consente di disegnare con una sintassi dei comandi user friendly con moltissime possibilità grafiche.
Se non conosci TikZ è anche un’ottima occasione per cominciare che poi prima o poi serve.
Se hai difficoltà, posta un esempio di codice e poni domande precise.
Grazie.
Buon lavoro.
R.
-
14 Febbraio 2016 alle 13:27 #105022::
Grazie mille!!
Ho letto la guida, questo pacchetto è stupendo! Sono riuscita a disegnare gli alberi, ma ho un dubbio! Mi compare un punto subito dopo il riquadro dell’ultimo ramo, e non so come toglierlo![attachment=1534]Schermata2016-02-14alle15.14.39.png[/attachment]
`
\begin{center}
\tikz [font=\small,
grow=right,
level 1/.style={sibling distance=6em},
level 2/.style={sibling distance=2em},
level distance=3cm]
\node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$A$} % root
child { node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$D$}
child { node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$O$}}
child { node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$N$}}
child{node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$M$}}}
child { node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$C$}
child { node [shape=rectangle, rounded corners=1mm, draw, inner sep=4, text width=1cm, align=flush center] {$L$}}
child { node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$I$}}
child{node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$H$}}}
child { node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$B$}
child{node [shape=rectangle, rounded corners=1mm, draw, inner sep=4, text width=1cm, align=flush center] {$G$}}
child { node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$F$}}
child{node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$E$}}}
\end{center}\begin{center}
\tikz [font=\small,
grow=right,
level 1/.style={sibling distance=3em},
level 2/.style={sibling distance=3em},
level distance=3cm]
\node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$A$} % root
child { node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$D$}
child { node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$O$}}
child { node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$N$}}
child{node [shape=rectangle, rounded corners=1mm, inner sep=4, text width=1cm, align=flush center] {}}}
child { node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$C$}
child { node [shape=rectangle, rounded corners=1mm, inner sep=4, text width=1cm, align=flush center] {}}
child { node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$I$}}
child{node [shape=rectangle, rounded corners=1mm, inner sep=4, text width=1cm, align=flush center] {}}}
child { node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$B$}
child{node [shape=rectangle, rounded corners=1mm, inner sep=4, text width=1cm, align=flush center] {}}
child { node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$F$}}
child{node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$E$}}}
\end{center}
`(P.S. so di poter migliorare il codice ed evitare così di riscrivere le caratteristiche di ogni nodo in ogni riga, ci sto lavorando!)
Inoltre, vorrei chiedervi se possibile mettere i due alberi affiancati.
Davvero grazie!
Attachments:
You must be logged in to view attached files. -
14 Febbraio 2016 alle 13:59 #105023::
asym88″ post=105164Grazie mille!!
Ho letto la guida, questo pacchetto è stupendo! Sono riuscita a disegnare gli alberi, ma ho un dubbio! Mi compare un punto subito dopo il riquadro dell’ultimo ramo, e non so come toglierlo![attachment=1534]Schermata2016-02-14alle15.14.39.png[/attachment]
`
\begin{center}
\tikz [font=\small,
grow=right,
level 1/.style={sibling distance=6em},
level 2/.style={sibling distance=2em},
level distance=3cm]
\node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$A$} % root
child { node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$D$}
child { node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$O$}}
child { node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$N$}}
child{node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$M$}}}
child { node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$C$}
child { node [shape=rectangle, rounded corners=1mm, draw, inner sep=4, text width=1cm, align=flush center] {$L$}}
child { node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$I$}}
child{node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$H$}}}
child { node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$B$}
child{node [shape=rectangle, rounded corners=1mm, draw, inner sep=4, text width=1cm, align=flush center] {$G$}}
child { node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$F$}}
child{node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$E$}}}
\end{center}\begin{center}
\tikz [font=\small,
grow=right,
level 1/.style={sibling distance=3em},
level 2/.style={sibling distance=3em},
level distance=3cm]
\node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$A$} % root
child { node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$D$}
child { node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$O$}}
child { node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$N$}}
child{node [shape=rectangle, rounded corners=1mm, inner sep=4, text width=1cm, align=flush center] {}}}
child { node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$C$}
child { node [shape=rectangle, rounded corners=1mm, inner sep=4, text width=1cm, align=flush center] {}}
child { node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$I$}}
child{node [shape=rectangle, rounded corners=1mm, inner sep=4, text width=1cm, align=flush center] {}}}
child { node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$B$}
child{node [shape=rectangle, rounded corners=1mm, inner sep=4, text width=1cm, align=flush center] {}}
child { node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$F$}}
child{node [shape=rectangle, rounded corners=1mm,draw, inner sep=4, text width=1cm, align=flush center] {$E$}}}
\end{center}
`(P.S. so di poter migliorare il codice ed evitare così di riscrivere le caratteristiche di ogni nodo in ogni riga, ci sto lavorando!)
Inoltre, vorrei chiedervi se possibile mettere i due alberi affiancati.
Davvero grazie!
Il punto è probabilmente dovuto a un punto che hai lasciato nel codice: provando quello che hai allegato non compare. Per avere i grafi affiancati, puoi pensare di fare così: `\begin{center}
\end{center}` Attenta: se i grafi sono grandi, puoi scalarne le dimensioni mettendo come opzioni al comando [tt]\tikz[/tt] [tt]scale=, transform shape[/tt]. E, si, usando gli stili eviti di copiare e incollare tutte le volte le definizioni 😉
Fra le guide della sezione documentazione, trovi anche L’Arte di disegnare con LaTeX: è un ottima guida, in italiano, per iniziare con TikZ.
Ciao
Claudio
-
14 Febbraio 2016 alle 14:22 #105024
-
-
AutoreRisposte
- Devi essere connesso per rispondere a questo topic.