cardiff: generic do_plot() function

At least, plotting will be a common thing between raw data and metadata.
So let's make a generic function for both.