SkillAgentSearch skills...

Contour2DPlot

Simple plotting package written in Java and JavaFX, allowing for the creation of two-dimensional contour plot for two-dimensional data. Implementation is based on Marching Squares - https://en.wikipedia.org/wiki/Marching_squares#Isoband.

Install / Use

/learn @piotrdzwiniel/Contour2DPlot
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Contour2DPlot

<h4>Under GNU GPLv3 license (or later)</h4> Simple plotting package written in Java and JavaFX, allowing for the creation of two-dimensional contour plot for two-dimensional data. Implementation is based on Marching Squares - https://en.wikipedia.org/wiki/Marching_squares#Isoband. <h2>How to use?</h2>

In order to use package in your project you have to copy and paste org.contour2dplot.* to the project's location. Now, after including imports in your class, all you need to do is to prepare double[][] data and create Contour2DMap object. Example use can look like this:

// Specify in the constructor width and height of the contour map.
Contour2DMap contour2DMap = new Contour2DMap(600, 600);

// Specify size for the contour map container.
contour2DMap.setPrefSize(600, 600);

// Set data.
contour2DMap.setData(data);

// Set iso factor, which is a step between subsequent iso values.
contour2DMap.setIsoFactor(1.0);

// Set interpolation factor.
contour2DMap.setInterpolationFactor(10);

// Set contour map color scale - "Color" or "Monochromatic".
contour2DMap.setMapColorScale("Color");

// Draw all elements on the contour map.
contour2DMap.draw();    

Contour2DMap object inherits from javafx.scene.layout.Pane, so you can nest it in other javafx.scene.layout.* objects, such as BorderPane.

<h2>Screenshots</h2>

Contour2DPlot allows one to plot color and monochromatic maps.

Image1

Image2

<hr> <h1>How can I cite Contour2DPlot?</h1>

Contour2DPlot was created because I was lacking of an appropriate visualization tool for my Specvis project (https://github.com/piotrdzwiniel/Specvis). So if you find Contour2DPlot useful for your work/study/research please consider to cite the paper given below:

<ul> <li>Dzwiniel P, Gola M, Wójcik-Gryciuk A, Waleszczyk WJ (2017) Specvis: Free and open-source software for visual field examination. PLoS ONE 12 (10): e0186224. <a href="http://journals.plos.org/plosone/article?id=10.1371/journal.pone.0186224"> https://doi.org/10.1371/journal.pone.0186224</a>.</li> </ul>

Why I ask you to cite Contour2DPlot by citing Specvis? Well, to be honest, citing it gives me some credit for its creation and motivate me to continue its development. But citing it is also important for a different reason - if you had found Contour2DPlot and/or Specvis useful, it would be desirable to share knowledge about it with others, so it can get to as many people as possible and serve well wherever it's needed.

Piotr Dzwiniel.

View on GitHub
GitHub Stars14
CategoryDevelopment
Updated8mo ago
Forks8

Languages

Java

Security Score

67/100

Audited on Jul 17, 2025

No findings