<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi Giacomo,</p>
    <p>Maybe it is better to share a sketch of what you want. </p>
    <p>0) From the description of your use case, you can use the
      geographic position of the nodes, right? You might be able to do
      what you want just by creating points where you want to show the
      grid voltage and then create direct lines between nodes. If you
      can display it on the map, you don't need a graph.</p>
    <p>1) Yes, you can use graphviz in the python console.</p>
    <p>2) Graphviz does not read shapefiles. You have to iterate over
      your layer and generate the corresponding graph nodes and edges. <br>
    </p>
    <p>Regards,</p>
    <p>Jorge Gustavo<br>
    </p>
    <div class="moz-cite-prefix">Às 23:06 de 09/02/21, Giacomo Uguccioni
      escreveu:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAJG-yDQk8ZHjS3zZ8Qxbbrmxad_G+M3PRYT4k6gOfeMcb5nYbA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="auto">Thank you guys for the support.</div>
      <div dir="auto">Could I work with Graphviz in the python console
        inside Qgis? And does Graphviz support shapefiles or similar as
        an input? </div>
      <div><br>
        <div class="gmail_quote">
          <div dir="ltr" class="gmail_attr">Il giorno mar 9 feb 2021
            alle 20:07 Jorge Gustavo Rocha <<a
              href="mailto:jgr@geomaster.pt" moz-do-not-send="true">jgr@geomaster.pt</a>>
            ha scritto:<br>
          </div>
          <blockquote class="gmail_quote" style="margin:0 0 0
            .8ex;border-left:1px #ccc solid;padding-left:1ex">
            <div>
              <p>Hi,</p>
              <p>I second Chris's proposal. Using graphviz python module
                [1], you can generate your graph by iterating over the
                features.<br>
              </p>
              <p>At the end, just call the render and you will get the
                rendered graph (just add view=True) within your QGIS
                environment. You need to know some Python basic stuff,
                but not much than the basic.<br>
              </p>
              <p>Regards,</p>
              <p>Jorge Gustavo<br>
              </p>
              <p>[1] <a
                  href="https://graphviz.readthedocs.io/en/stable/manual.html"
                  target="_blank" moz-do-not-send="true">https://graphviz.readthedocs.io/en/stable/manual.html</a><br>
              </p>
              <div>Às 18:55 de 09/02/21, chris hermansen escreveu:<br>
              </div>
            </div>
            <div>
              <blockquote type="cite">
                <div dir="ltr">
                  <div dir="ltr">Giacomo and list,<br>
                  </div>
                  <br>
                  <div class="gmail_quote">
                    <div dir="ltr" class="gmail_attr">On Tue, Feb 9,
                      2021 at 8:07 AM Giacomo Uguccioni <<a
                        href="mailto:giacomo.uguccioni@gmail.com"
                        target="_blank" moz-do-not-send="true">giacomo.uguccioni@gmail.com</a>>
                      wrote:<br>
                    </div>
                    <blockquote class="gmail_quote" style="margin:0px
                      0px 0px 0.8ex;border-left:1px solid
                      rgb(204,204,204);padding-left:1ex">
                      <div dir="ltr">Hello everyone, and thanks for the
                        support.
                        <div>If this is not the place to ask for this
                          kind of thing, I ask you to give me a link
                          where I could find support.</div>
                        <div>I'm a qgis 3.14 user. I would like to
                          represent a tree diagram or functional diagram
                          being able to draw the symbology and position
                          of nodes and connections from the information
                          contained in the attribute table. Example: I
                          would like to represent the medium voltage
                          grid of a city as an electrical diagram; I
                          would like to represent with lines that join
                          at nodes the roads that connect certain houses
                          and schools in a city. So my goal is to be
                          able to build a layout with symbology of nodes
                          and connections derived from information
                          contained in different shapefiles or within
                          features, with a non-geographic but schematic
                          / ideal criterion.</div>
                        <div>Do you have any ideas or suggestions on how
                          to do it? I thank you for every contribution.</div>
                      </div>
                      <br>
                    </blockquote>
                    <div><br>
                    </div>
                    <div>Not a QGIS-based solution, but I've used <a
                        href="https://graphviz.org/" target="_blank"
                        moz-do-not-send="true">graphviz</a> to generate
                      graphs from the command line with considerable
                      success.  It offers a small but useful programming
                      language that can be combined with data in text
                      files in a really useful way.<br clear="all">
                    </div>
                  </div>
                  <div><br>
                    -- <br>
                    <div dir="ltr">
                      <div dir="ltr">Chris Hermansen · clhermansen "at"
                        gmail "dot" com<br>
                        <br>
                        C'est ma façon de parler.</div>
                    </div>
                  </div>
                </div>
                <br>
                <fieldset></fieldset>
                <pre>_______________________________________________
Qgis-user mailing list
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank" moz-do-not-send="true">Qgis-user@lists.osgeo.org</a>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank" moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank" moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
</pre>
              </blockquote>
              <div>-- <br>
                <table
                  style="width:525px;font-size:11pt;font-family:Arial,sans-serif"
                  cellspacing="0" cellpadding="0">
                  <tbody>
                    <tr>
                      <td
style="text-align:center;font-size:10pt;font-family:Arial,sans-serif;border-right:1px
solid;border-right-color:#fb6303;width:125px;padding-right:10px;vertical-align:top"
                        rowspan="6" width="125" valign="top"> <a
                          href="https://www.geomaster.pt"
                          target="_blank" moz-do-not-send="true"><img
                            alt="Logo"
                            style="width:105px;height:auto;border:0"
src="https://geomaster.pt/wp-content/uploads/2017/02/cropped-geomaster300x300-1.png"
                            moz-do-not-send="true" width="85" border="0"></a>
                      </td>
                      <td style="padding-left:10px">
                        <table cellspacing="0" cellpadding="0">
                          <tbody>
                            <tr>
                              <td
style="font-size:10pt;color:#0079ac;font-family:Arial,sans-serif;width:400px;padding-bottom:5px;padding-left:10px;vertical-align:top"
                                valign="top"> <strong><span
                                    style="font-size:14pt;font-family:Arial,sans-serif;color:#fb6303">Geomaster</span></strong><br>
                                <strong><span
                                    style="font-size:11pt;font-family:Arial,sans-serif;color:black">Jorge
                                    Gustavo Rocha</span></strong> <span
style="font-family:Arial,sans-serif;font-size:11pt;color:#000000"><span
style="padding-right:5px;padding-left:5px"> | </span>Software Engineer</span>
                              </td>
                            </tr>
                            <tr>
                              <td
style="font-size:10pt;color:#444444;font-family:Arial,sans-serif;padding-bottom:5px;padding-top:5px;padding-left:10px;vertical-align:top;line-height:17px"
                                valign="top"> <span><span
                                    style="color:#fb6303"><strong>e:</strong></span><span
style="font-size:10pt;font-family:Arial,sans-serif;color:#000000"> <a
                                      href="mailto:jgr@geomaster.pt"
                                      target="_blank"
                                      moz-do-not-send="true">jgr@geomaster.pt</a></span></span>
                                <span><span
                                    style="padding-left:5px;padding-right:5px">
                                    | </span><span
                                    style="color:#fb6303"><strong>m:</strong></span><span
style="font-size:10pt;font-family:Arial,sans-serif;color:#000000"> +351
                                    910 333 888<br>
                                  </span></span> <span><span
                                    style="color:#fb6303"><strong>g:</strong></span><span
style="font-size:10pt;font-family:Arial,sans-serif;color:#000000">
                                    41.54094,-8.40490</span></span> <span><span
style="padding-left:7px;padding-right:5px"> | </span><span
                                    style="color:#fb6303"><strong>v: </strong></span><span
style="font-size:10pt;font-family:Arial,sans-serif;color:#000000;padding-left:7px">
                                    510 906 109<br>
                                  </span></span> <span> <span
                                    style="color:#fb6303"><strong>a: </strong></span>
                                </span> <span> <span
                                    style="font-size:10pt;font-family:Arial,sans-serif;color:#000000"><span>
                                    </span><a
href="https://www.google.com/maps/search/Rua%0D%0A++++++++++++++++++++++++++Ant%C3%B3nio+C%C3%A2ndido+Pinto,+67,+4715-400+Braga?entry=gmail&source=g"
                                      moz-do-not-send="true">Rua António
                                      Cândido Pinto, 67, 4715-400 Braga</a><br>
                                  </span></span> </td>
                            </tr>
                          </tbody>
                        </table>
                      </td>
                    </tr>
                  </tbody>
                </table>
              </div>
            </div>
            _______________________________________________<br>
            Qgis-user mailing list<br>
            <a href="mailto:Qgis-user@lists.osgeo.org" target="_blank"
              moz-do-not-send="true">Qgis-user@lists.osgeo.org</a><br>
            List info: <a
              href="https://lists.osgeo.org/mailman/listinfo/qgis-user"
              rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
            Unsubscribe: <a
              href="https://lists.osgeo.org/mailman/listinfo/qgis-user"
              rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
          </blockquote>
        </div>
      </div>
      -- <br>
      <div dir="ltr" class="gmail_signature"
        data-smartmail="gmail_signature">
        <div dir="ltr">
          <div style="text-align:right"><b
              style="font-family:"arial narrow",sans-serif">Giacomo
              Uguccioni</b></div>
          <div style="text-align:right"><b
              style="font-family:"arial narrow",sans-serif">Geospatial
              Data Acquisition & Processing</b></div>
          <div style="text-align:right"><span
              style="font-family:"arial narrow",sans-serif">+39
              3920431219</span><br>
          </div>
          <div style="text-align:left">
            <div
              style="color:rgb(34,34,34);font-size:13.33px;font-family:arial"><font
                face="arial"><font size="1">Le informazioni contenute
                  nella presente comunicazione sono</font></font><font
                size="1"> riservate esclusivamente ai destinatari
                indicati in epigrafe. La diffusione del documento
                trasmesso da parte di qualsiasi soggetto diverso dal
                mittente e dal destinatario è proibita, sia ai sensi
                dell’art. 616 c.p., sia ai sensi del D.Lgs. n. 196/2003
                e regolamento UE n. 2016/679.</font></div>
            <div
              style="color:rgb(34,34,34);font-size:13.33px;font-family:arial"><font
                size="1">Se avete ricevuto questo messaggio per errore,
                vi preghiamo di distruggerlo e di darcene immediata
                comunicazione anche inviando un messaggio di ritorno
                all’indirizzo e-mail del mittente. </font></div>
          </div>
        </div>
      </div>
    </blockquote>
    <div class="moz-signature">-- <br>
      <title>Email Signature</title>
      <meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
      <table style="width: 525px; font-size: 11pt; font-family: Arial,
        sans-serif;" cellspacing="0" cellpadding="0">
        <tbody>
          <tr>
            <td style="text-align:center; font-size: 10pt; font-family:
              Arial, sans-serif; border-right: 1px solid;
              border-right-color: #fb6303; width: 125px; padding-right:
              10px; vertical-align: top;" rowspan="6" width="125"
              valign="top"> <a href="https://www.geomaster.pt"
                target="_blank"><img alt="Logo" style="width:105px;
                  height:auto; border:0;"
src="https://geomaster.pt/wp-content/uploads/2017/02/cropped-geomaster300x300-1.png"
                  width="85" border="0"></a> </td>
            <td style="padding-left:10px">
              <table cellspacing="0" cellpadding="0">
                <tbody>
                  <tr>
                    <td style="font-size: 10pt; color:#0079ac;
                      font-family: Arial, sans-serif; width: 400px;
                      padding-bottom: 5px; padding-left: 10px;
                      vertical-align: top;" valign="top"> <strong><span
                          style="font-size: 14pt; font-family: Arial,
                          sans-serif; color:#fb6303;">Geomaster</span></strong><br>
                      <strong><span style="font-size: 11pt; font-family:
                          Arial, sans-serif; color:black;">Jorge Gustavo
                          Rocha</span></strong> <span
                        style="font-family: Arial, sans-serif;
                        font-size:11pt; color:#000000;"><span
                          style="padding-right: 5px; padding-left: 5px;">
                          | </span>Software Engineer</span> </td>
                  </tr>
                  <tr>
                    <td style="font-size: 10pt; color:#444444;
                      font-family: Arial, sans-serif; padding-bottom:
                      5px; padding-top: 5px; padding-left: 10px;
                      vertical-align: top; line-height:17px;"
                      valign="top"> <span><span style="color: #fb6303;"><strong>e:</strong></span><span
                          style="font-size: 10pt; font-family: Arial,
                          sans-serif; color:#000000;"> <a class="moz-txt-link-abbreviated" href="mailto:jgr@geomaster.pt">jgr@geomaster.pt</a></span></span>
                      <span><span style="padding-left:
                          5px;padding-right: 5px;"> | </span><span
                          style="color: #fb6303;"><strong>m:</strong></span><span
                          style="font-size: 10pt; font-family: Arial,
                          sans-serif; color:#000000;"> +351 910 333 888<br>
                        </span></span> <span><span style="color:
                          #fb6303;"><strong>g:</strong></span><span
                          style="font-size: 10pt; font-family: Arial,
                          sans-serif; color:#000000;"> 41.54094,-8.40490</span></span>
                      <span><span style="padding-left:
                          7px;padding-right: 5px;"> | </span><span
                          style="color: #fb6303;"><strong>v: </strong></span><span
                          style="font-size: 10pt; font-family: Arial,
                          sans-serif; color:#000000; padding-left: 7px;">
                          510 906 109<br>
                        </span></span> <span> <span style="color:
                          #fb6303;"><strong>a: </strong></span> </span>
                      <span> <span style="font-size: 10pt; font-family:
                          Arial, sans-serif; color: #000000;"><span> </span>Rua
                          António Cândido Pinto, 67, 4715-400 Braga<br>
                        </span></span> </td>
                  </tr>
                </tbody>
              </table>
            </td>
          </tr>
        </tbody>
      </table>
    </div>
  </body>
</html>