legend fixed using png command