How to prevent file names from appearing in the graphs?

I don’t like the PDF file names appearing on the graphs because they appear too big or have strange numbers at the end. Is there a way to change this?
Thank you very much for your support