fixed plotting pipeline