I would create a java program to save a graph as image PNG
for example with the following data:
x-axis: 01 02 03 04 05 06 07 08 09 10
y-axis: 610 635 659 680 699 712 722 732 736 749
Theoretically you'd do that following these steps. Actually you have to first learn how to work with particular parts:
array
or a List
.javafx
or any graphics library.javafx
, you can capture its canvas with canvas.snapshot(..)
ImageIO.write(SwingFXUtils.fromFXImage(wim, null), "png", file);
I recommend you to start with learning all about variables, data types, arrays, loops and lists/maps. Don't start with 2D drawing unless you can handle with data :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With