apply_plot_modifications function

This function checks the plot type and applies specific modifications to the plot object based on the provided parameters.