update sine example to use plot_viewport