<!DOCTYPE html> 
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>tinytable</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/css/bootstrap.min.css" rel="stylesheet">
    <style>
.table td.tinytable, .table th.tinytable {    border-bottom: solid 0.1em #d3d8dc; }
.table td.tinytable, .table th.tinytable {    text-align: center; }
    </style>
    <script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
    <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"></script>
    <script>
    MathJax = {
      tex: {
        inlineMath: [['$', '$'], ['\\(', '\\)']]
      },
      svg: {
        fontCache: 'global'
      }
    };
    </script>
  </head>

  <body>
    <div class="container">
      <table class="table table-borderless" id="tinytable" style="width: auto; margin-left: auto; margin-right: auto;" data-quarto-disable-processing='true'>
        <thead>
        
              <tr>
                <th scope="col">Variables</th>
                <th scope="col">Histogram</th>
                <th scope="col">Density</th>
                <th scope="col">Bar</th>
                <th scope="col">Line</th>
              </tr>
        </thead>
        
        <tbody>
                <tr>
                  <td>mpg</td>
                  <td><img src="./tinytable/id7qdnb1xl7u8d7sc7aw1o.png" style="height: 1em;"></td>
                  <td><img src="./tinytable/idulhizcx484e3tmjfu4f8.png" style="height: 1em;"></td>
                  <td><img src="./tinytable/idmgb8tn3vud8442um2ayf.png" style="height: 1em;"></td>
                  <td><img src="./tinytable/id613ixfj3t6c5gd8mg728.png" style="height: 1em;"></td>
                </tr>
                <tr>
                  <td>hp</td>
                  <td><img src="./tinytable/iduzv50d8qcqtburluw93m.png" style="height: 1em;"></td>
                  <td><img src="./tinytable/idu6s7kticpuemmuxsx4s6.png" style="height: 1em;"></td>
                  <td><img src="./tinytable/id64ryugq0peauz2wzxu0e.png" style="height: 1em;"></td>
                  <td><img src="./tinytable/id3r7eiz7bnbr6bxyrr0ce.png" style="height: 1em;"></td>
                </tr>
                <tr>
                  <td>qsec</td>
                  <td><img src="./tinytable/idur2my2myvhblenee0idt.png" style="height: 1em;"></td>
                  <td><img src="./tinytable/idg2s1kmqhbf2cdtsbcuqd.png" style="height: 1em;"></td>
                  <td><img src="./tinytable/idy7y6p0rhsf02z6yanxsz.png" style="height: 1em;"></td>
                  <td><img src="./tinytable/idtjt8jlcxmmppaj0kb38w.png" style="height: 1em;"></td>
                </tr>
        </tbody>
      </table>
    </div>

    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js"></script>
    <script>
      function tinytable(i, j, css_id) {
        var table = document.getElementById("tinytable");
        table.rows[i].cells[j].classList.add(css_id);
      }
      function insertSpanRow(i, colspan, content) {
        var table = document.getElementById('tinytable');
        var newRow = table.insertRow(i);
        var newCell = newRow.insertCell(0);
        newCell.setAttribute("colspan", colspan);
        // newCell.innerText = content;
        // this may be unsafe, but innerText does not interpret <br>
        newCell.innerHTML = content;
      }
      function spanCell_tinytable(i, j, rowspan, colspan) {
        var table = document.getElementById("tinytable");
        const targetRow = table.rows[i];
        const targetCell = targetRow.cells[j];
        for (let r = 0; r < rowspan; r++) {
          // Only start deleting cells to the right for the first row (r == 0)
          if (r === 0) {
            // Delete cells to the right of the target cell in the first row
            for (let c = colspan - 1; c > 0; c--) {
              if (table.rows[i + r].cells[j + c]) {
                table.rows[i + r].deleteCell(j + c);
              }
            }
          }
          // For rows below the first, delete starting from the target column
          if (r > 0) {
            for (let c = colspan - 1; c >= 0; c--) {
              if (table.rows[i + r] && table.rows[i + r].cells[j]) {
                table.rows[i + r].deleteCell(j);
              }
            }
          }
        }
        // Set rowspan and colspan of the target cell
        targetCell.rowSpan = rowspan;
        targetCell.colSpan = colspan;
      }

window.addEventListener('load', function () { tinytable(0, 0, 'tinytable') })
window.addEventListener('load', function () { tinytable(0, 1, 'tinytable') })
window.addEventListener('load', function () { tinytable(0, 2, 'tinytable') })
window.addEventListener('load', function () { tinytable(0, 3, 'tinytable') })
window.addEventListener('load', function () { tinytable(0, 4, 'tinytable') })
window.addEventListener('load', function () { tinytable(0, 1, 'tinytable') })
window.addEventListener('load', function () { tinytable(0, 2, 'tinytable') })
window.addEventListener('load', function () { tinytable(0, 3, 'tinytable') })
window.addEventListener('load', function () { tinytable(0, 4, 'tinytable') })
window.addEventListener('load', function () { tinytable(1, 1, 'tinytable') })
window.addEventListener('load', function () { tinytable(1, 2, 'tinytable') })
window.addEventListener('load', function () { tinytable(1, 3, 'tinytable') })
window.addEventListener('load', function () { tinytable(1, 4, 'tinytable') })
window.addEventListener('load', function () { tinytable(2, 1, 'tinytable') })
window.addEventListener('load', function () { tinytable(2, 2, 'tinytable') })
window.addEventListener('load', function () { tinytable(2, 3, 'tinytable') })
window.addEventListener('load', function () { tinytable(2, 4, 'tinytable') })
window.addEventListener('load', function () { tinytable(3, 1, 'tinytable') })
window.addEventListener('load', function () { tinytable(3, 2, 'tinytable') })
window.addEventListener('load', function () { tinytable(3, 3, 'tinytable') })
window.addEventListener('load', function () { tinytable(3, 4, 'tinytable') })
    </script>

  </body>

</html>
