First working version producing plots