refactor solving single optimization into its own function

Signed-off-by: Jacob Emmert-Aronson <jre2718@berkeley.edu>
implement plotting

Signed-off-by: Jacob Emmert-Aronson <jre2718@berkeley.edu>
add command-line script for plotting

Signed-off-by: Jacob Emmert-Aronson <jre2718@berkeley.edu>