Full function version FOR <s-plot.sh>