implement line plots and sub-plots