Lasciare spazio bianco al posto del grafico con Tikzpicture

  • Creatore
    Topic
  • #93039
    Up
    0
    Down
    ::


    Ciao a tutti,

    avrei bisogno di lasciare lo spazio vuoto anziché far “stampare” il grafico in una specifica posizione utilizzando il comando groupplot con tikzpicture. Mi spiego.

    Vorrei mettere 10 grafici affiancati, in 2 righe e 5 colonne.
    >> la riga superiore ha i grafici 5 4 3 2 1
    >> la riga inferiore ha i grafici 6 \ \ \ 7

    questo perchè devo fare un confronto tra i primi 5, ed un confronto tra 5-6 e 1-7. Avrei quindi bisogno di lasciare lo spazio dedicato ai grafici sotto 4,3,2 completamente bianco.

    Il mio codice attuale è:

    `
    \begin{tikzpicture}[scale=0.75]

    \begin{groupplot}[%
    group style={
    group name=my plots,
    group size=5 by 2,
    xlabels at=edge bottom,
    ylabels at=edge left,
    },
    width=5cm,
    height=10cm,
    %scale only axis,
    xmin=15,
    xmax=30,
    xtick={15,17.5,20,22.5,25,27.5,30},
    xticklabels={15,,20,,25,,30},
    ytick={0,0.1,0.5,1,1.5,2,2.25},
    yticklabels={0,out,0.5,1,1.5,2,in},
    xlabel={$Temperatura$ $(\SI{}{\celsius}) $},
    ymin=0,
    ymax=2.4,
    ylabel={$Altezza$ $(m)$},
    grid=major,
    ]
    \nextgroupplot[title=S5];
    \addplot
    table[row sep=crcr]{
    30 0.1 \\
    15 0.1 \\
    };
    \addplot
    table[row sep=crcr]{
    30 2.25 \\
    15 2.25 \\
    };
    \addplot
    table[row sep=crcr]{
    21.273 0.0120603 \\
    21.062 0.0241206 \\
    ecc ecc
    };
    \addplot
    table[row sep=crcr]{
    21.6531 0.0503145 \\
    21.6743 0.090566 \\
    ecc
    };
    \nextgroupplot[title=S4];
    \addplot
    table[row sep=crcr]{
    30 0.1 \\
    15 0.1 \\
    };
    \addplot
    table[row sep=crcr]{
    30 2.25 \\
    15 2.25 \\
    };
    \addplot
    table[row sep=crcr]{
    21.194 0.0120603 \\
    20.94 0.0241206 \\
    ecc
    };
    \addplot
    table[row sep=crcr]{
    21.6531 0.0402516 \\
    21.6743 0.100629 \\
    ecc
    };
    \nextgroupplot[title=S3];
    \addplot
    table[row sep=crcr]{
    30 0.1 \\
    15 0.1 \\
    };
    \addplot
    table[row sep=crcr]{
    30 2.25 \\
    15 2.25 \\
    };
    \addplot
    table[row sep=crcr]{
    21.208 0.0120603 \\
    20.846 0.0241206 \\
    ecc
    };
    \addplot
    table[row sep=crcr]{
    21.4195 0.0955975 \\
    21.3982 0.140881 \\
    ecc
    };
    \nextgroupplot[title=S2];
    \addplot
    table[row sep=crcr]{
    30 0.1 \\
    15 0.1 \\
    };
    \addplot
    table[row sep=crcr]{
    30 2.25 \\
    15 2.25 \\
    };
    \addplot
    table[row sep=crcr]{
    21.028 0.0120603 \\
    20.598 0.0241206 \\
    ecc
    };
    \addplot
    table[row sep=crcr]{
    21.4195 0.0402516 \\
    21.4195 0.090566 \\
    ecc
    };
    \nextgroupplot[title=S1];
    \addplot
    table[row sep=crcr]{
    30 0.1 \\
    15 0.1 \\
    };
    \addplot
    table[row sep=crcr]{
    30 2.25 \\
    15 2.25 \\
    };
    \addplot
    table[row sep=crcr]{
    20.5940000000001 0.0120603 \\
    20.285 0.0241206 \\
    ecc
    };
    \addplot
    table[row sep=crcr]{
    21.4195 0.045283 \\
    21.4832 0.0955975 \\
    ecc
    };
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    \nextgroupplot[title=S7];
    \addplot
    table[row sep=crcr]{
    30 0.1 \\
    15 0.1 \\
    };
    \addplot
    table[row sep=crcr]{
    30 2.25 \\
    15 2.25 \\
    };
    \addplot
    table[row sep=crcr]{
    20.5940000000001 0.0120603 \\
    20.285 0.0241206 \\
    ecc
    };
    \addplot
    table[row sep=crcr]{
    21.4195 0.045283 \\
    21.4832 0.0955975 \\
    };
    \nextgroupplot[];
    \nextgroupplot[];
    \nextgroupplot[];
    \nextgroupplot[title=S5];
    \addplot
    table[row sep=crcr]{
    30 0.1 \\
    15 0.1 \\
    };
    \addplot
    table[row sep=crcr]{
    30 2.25 \\
    15 2.25 \\
    };
    \addplot
    table[row sep=crcr]{
    20.5940000000001 0.0120603 \\
    20.285 0.0241206 \\
    ecc
    };
    \addplot
    table[row sep=crcr]{
    21.4195 0.045283 \\
    21.4832 0.0955975 \\
    ecc
    };
    \end{groupplot}
    \end{tikzpicture}%
    `

    ho cercato di lasciare lo spazio vuoto mettendo \nextgroupplot[]; ma giustamente, come mi aspettavo, mi mette un grafico completo di griglia assi ecc. Come posso fare per avere come risultato la mia idea?

    Grazie!

Visualizzazione 1 filone di risposte
  • Autore
    Risposte
    • #93040
      Up
      0
      Down
      ::

      Frigeri” post=92680Ciao a tutti,

      avrei bisogno di lasciare lo spazio vuoto anziché far “stampare” il grafico in una specifica posizione utilizzando il comando groupplot con tikzpicture. Mi spiego.

      Vorrei mettere 10 grafici affiancati, in 2 righe e 5 colonne.
      >> la riga superiore ha i grafici 5 4 3 2 1
      >> la riga inferiore ha i grafici 6 \ \ \ 7

      questo perchè devo fare un confronto tra i primi 5, ed un confronto tra 5-6 e 1-7. Avrei quindi bisogno di lasciare lo spazio dedicato ai grafici sotto 4,3,2 completamente bianco.

      Il mio codice attuale è:

      `
      \begin{tikzpicture}[scale=0.75]

      \begin{groupplot}[%
      group style={
      group name=my plots,
      group size=5 by 2,
      xlabels at=edge bottom,
      ylabels at=edge left,
      },
      width=5cm,
      height=10cm,
      %scale only axis,
      xmin=15,
      xmax=30,
      xtick={15,17.5,20,22.5,25,27.5,30},
      xticklabels={15,,20,,25,,30},
      ytick={0,0.1,0.5,1,1.5,2,2.25},
      yticklabels={0,out,0.5,1,1.5,2,in},
      xlabel={$Temperatura$ $(\SI{}{\celsius}) $},
      ymin=0,
      ymax=2.4,
      ylabel={$Altezza$ $(m)$},
      grid=major,
      ]
      \nextgroupplot[title=S5];
      \addplot
      table[row sep=crcr]{
      30 0.1 \\
      15 0.1 \\
      };
      \addplot
      table[row sep=crcr]{
      30 2.25 \\
      15 2.25 \\
      };
      \addplot
      table[row sep=crcr]{
      21.273 0.0120603 \\
      21.062 0.0241206 \\
      ecc ecc
      };
      \addplot
      table[row sep=crcr]{
      21.6531 0.0503145 \\
      21.6743 0.090566 \\
      ecc
      };
      \nextgroupplot[title=S4];
      \addplot
      table[row sep=crcr]{
      30 0.1 \\
      15 0.1 \\
      };
      \addplot
      table[row sep=crcr]{
      30 2.25 \\
      15 2.25 \\
      };
      \addplot
      table[row sep=crcr]{
      21.194 0.0120603 \\
      20.94 0.0241206 \\
      ecc
      };
      \addplot
      table[row sep=crcr]{
      21.6531 0.0402516 \\
      21.6743 0.100629 \\
      ecc
      };
      \nextgroupplot[title=S3];
      \addplot
      table[row sep=crcr]{
      30 0.1 \\
      15 0.1 \\
      };
      \addplot
      table[row sep=crcr]{
      30 2.25 \\
      15 2.25 \\
      };
      \addplot
      table[row sep=crcr]{
      21.208 0.0120603 \\
      20.846 0.0241206 \\
      ecc
      };
      \addplot
      table[row sep=crcr]{
      21.4195 0.0955975 \\
      21.3982 0.140881 \\
      ecc
      };
      \nextgroupplot[title=S2];
      \addplot
      table[row sep=crcr]{
      30 0.1 \\
      15 0.1 \\
      };
      \addplot
      table[row sep=crcr]{
      30 2.25 \\
      15 2.25 \\
      };
      \addplot
      table[row sep=crcr]{
      21.028 0.0120603 \\
      20.598 0.0241206 \\
      ecc
      };
      \addplot
      table[row sep=crcr]{
      21.4195 0.0402516 \\
      21.4195 0.090566 \\
      ecc
      };
      \nextgroupplot[title=S1];
      \addplot
      table[row sep=crcr]{
      30 0.1 \\
      15 0.1 \\
      };
      \addplot
      table[row sep=crcr]{
      30 2.25 \\
      15 2.25 \\
      };
      \addplot
      table[row sep=crcr]{
      20.5940000000001 0.0120603 \\
      20.285 0.0241206 \\
      ecc
      };
      \addplot
      table[row sep=crcr]{
      21.4195 0.045283 \\
      21.4832 0.0955975 \\
      ecc
      };
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      \nextgroupplot[title=S7];
      \addplot
      table[row sep=crcr]{
      30 0.1 \\
      15 0.1 \\
      };
      \addplot
      table[row sep=crcr]{
      30 2.25 \\
      15 2.25 \\
      };
      \addplot
      table[row sep=crcr]{
      20.5940000000001 0.0120603 \\
      20.285 0.0241206 \\
      ecc
      };
      \addplot
      table[row sep=crcr]{
      21.4195 0.045283 \\
      21.4832 0.0955975 \\
      };
      \nextgroupplot[];
      \nextgroupplot[];
      \nextgroupplot[];
      \nextgroupplot[title=S5];
      \addplot
      table[row sep=crcr]{
      30 0.1 \\
      15 0.1 \\
      };
      \addplot
      table[row sep=crcr]{
      30 2.25 \\
      15 2.25 \\
      };
      \addplot
      table[row sep=crcr]{
      20.5940000000001 0.0120603 \\
      20.285 0.0241206 \\
      ecc
      };
      \addplot
      table[row sep=crcr]{
      21.4195 0.045283 \\
      21.4832 0.0955975 \\
      ecc
      };
      \end{groupplot}
      \end{tikzpicture}%
      `

      ho cercato di lasciare lo spazio vuoto mettendo \nextgroupplot[]; ma giustamente, come mi aspettavo, mi mette un grafico completo di griglia assi ecc. Come posso fare per avere come risultato la mia idea?

      Grazie!

      [tt] \nextgroupplot[group/empty plot][/tt]?

      Ciao
      Claudio

    • #93041
      Up
      0
      Down
      ::


      Favoloso. Proprio quello di cui avevo bisogno!

      Ora resta da capire se esteticamente può andare perchè non mi piace molto 😀

      Grazie mille comunque!

Visualizzazione 1 filone di risposte
  • Devi essere connesso per rispondere a questo topic.

Go to top