Completed visualization function.