Search in sources :

Example 1 with SimpleSVGViewer

use of de.lmu.ifi.dbs.elki.visualization.gui.SimpleSVGViewer in project elki by elki-project.

the class VisualizePairwiseGainMatrix method showVisualization.

/**
 * Show a single visualization.
 *
 * @param context Visualizer context
 * @param factory Visualizer factory
 * @param task Visualization task
 */
private void showVisualization(VisualizerContext context, SimilarityMatrixVisualizer factory, VisualizationTask task) {
    VisualizationPlot plot = new VisualizationPlot();
    Visualization vis = factory.makeVisualization(context, task, plot, 1.0, 1.0, null);
    plot.getRoot().appendChild(vis.getLayer());
    plot.getRoot().setAttribute(SVGConstants.SVG_WIDTH_ATTRIBUTE, "20cm");
    plot.getRoot().setAttribute(SVGConstants.SVG_HEIGHT_ATTRIBUTE, "20cm");
    plot.getRoot().setAttribute(SVGConstants.SVG_VIEW_BOX_ATTRIBUTE, "0 0 1 1");
    plot.updateStyleElement();
    (new SimpleSVGViewer()).setPlot(plot);
}
Also used : Visualization(de.lmu.ifi.dbs.elki.visualization.visualizers.Visualization) VisualizationPlot(de.lmu.ifi.dbs.elki.visualization.gui.VisualizationPlot) SimpleSVGViewer(de.lmu.ifi.dbs.elki.visualization.gui.SimpleSVGViewer)

Aggregations

SimpleSVGViewer (de.lmu.ifi.dbs.elki.visualization.gui.SimpleSVGViewer)1 VisualizationPlot (de.lmu.ifi.dbs.elki.visualization.gui.VisualizationPlot)1 Visualization (de.lmu.ifi.dbs.elki.visualization.visualizers.Visualization)1