Improve handling of keyword arguments for plotting functions