made plots prettier and fixed bug in cpp