Update graphic function