A couple of weeks ago I ran into this problem myself, this library came to hand.
I was pleased to deal with it for long, because many examples are right there on the site + documentation, but this is if you decide to deeply understand.
It’s not completely clear what to draw ... If you have simple shapes, use Java 2D Graphics. And if you specifically draw different graphics, then there is a great lib JFreeChart .