Finalize create_pyramid_plot() function