adding filter to change table into figure