docs: synchronized void refresh() {
      if(reinitOnRefresh) {
        LOG.debug("Reinitialize in thread " + Thread.currentThread().getName());
        reinitialize();
        reinitOnRefresh = false;
        return;
      }
      synchronized(plot) {
        boolean refreshcss = false;
        if(plotmap == null) {
          throw new IllegalStateException("Plotmap is null");
        }
        final int thumbsize = (int) Math.max(screenwidth / plotmap.getWidth(), screenheight / plotmap.getHeight());
        for(PlotItem pi : plotmap.keySet()) {
          for(Iterator<PlotItem> iter = pi.itemIterator(); iter.hasNext();) {
            PlotItem it = iter.next();
  
            for(Iterator<VisualizationTask> tit = it.tasks.iterator(); tit.hasNext();) {
              VisualizationTask task = tit.next();
              Pair<Element, Visualization> pair = vistoelem.get(it, task);
              // New task?
              if(pair == null) {
                if(visibleInOverview(task)) {
                  Element elem = plot.svgElement(SVGConstants.SVG_G_TAG);
                  pair = new Pair<>(elem, embedOrThumbnail(thumbsize, it, task, elem));
                  vistoelem.get(it, null).first.appendChild(elem);
                  vistoelem.put(it, task, pair);
                  refreshcss = true;
                }
              }
              else if(pair.first != null) {
                if(visibleInOverview(task)) {
                  // unhide if hidden.
                  if(pair.first.hasAttribute(SVGConstants.CSS_VISIBILITY_PROPERTY)) {
                    pair.first.removeAttribute(SVGConstants.CSS_VISIBILITY_PROPERTY);
                  }
                }
                else {
                  // hide if there is anything to hide.
                  if(pair.first.hasChildNodes()) {
                    pair.first.setAttribute(SVGConstants.CSS_VISIBILITY_PROPERTY, SVGConstants.CSS_HIDDEN_VALUE);
                  }
                }
                // TODO: unqueue pending thumbnails
              }
            }
          }
        }
        if(refreshcss) {
          plot.updateStyleElement();
        }
      }
    }