Add image plotting to 2D plots and fix compilation issues