Creating matplot automatically