script for data plotting