new Function to generat a Grafic