Update QMetric.py

some corrections in function for printing graph