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);
}
Aggregations