A simple Java class for visualizing 2D scatter plots using only JavaFX without requiring any third-party libraries or components.
The class allows setting up the labels of the x-axis and y-axis, the title of the scatter plot, the range of the x-axis, and the range of the y-axis. If the user does not set any of these values, defaults are used. After this, making the scatter plot is conveniently calling the method:
plot(double x, double y, int groups)
where x and y are the data points, and groups correspond to the group or cluster of each data point. On the plot, the data points corresponding to the same group are drawn with the same color. Different groups have different colors.
The code is available at: https://github.com/Kyaw-Kyaw-Htike/2D-scatter-plot-using-JavaFX