Inline plotting code