I am trying to make a scatter plot with. Zooming seems to work but the dots spreading off the axis is something that I don't want. I have Googled for a while and could not solve my problem. I have already tried the solution posted in this post but it did not work: Svg clip-path within rectangle does not work
Please find my code here: https://github.com/e-kaya/scatter
What am I doing wrong?