Hi Andrew,
Welcome to JavaRanch!
"JavaScript" is a language for programming Web pages. "Java" is a language used frequently for programming in Web
servers. They're quite different languages. You've posted in a forum about
Java, but your reference to "JavaScript" is closer to reality.
There are lots of different ways to approach this. One simple one, especially if the points on the plot aren't too dense, is to use
Client-side image maps. There are plenty of other alternatives as well.
I'm going to move this to our
HTML and JavaScript forum, where this question is more on-topic. Go look for it there.