ADDED: R plotter code