Changed plot variables orientation. Added function to plot optimum condition.