functionalized scatter_demo.py

Created a function wrapper around scatter_demo.py