Title object appearing when saving a canvas as vector graphics formats

Hi everyone,
I’ve noticed a strange problem where I can plot many objects (a histogram stack and two other histograms) on a pad within a canvas and everything looks good, but if I Print the canvas to a .pdf or .eps (vector graphics format) file a title will all of a sudden appear on the canvas image. For example, my canvas looks normal and lacks a title at the top if I open it in a TBrowser or save it as a .png or .jpg, but if I save it as a .pdf or .eps that default title object shows up at the top of the canvas:

(I’m referring to the white box on the above image that overlaps partially with the luminosity number. I don’t see that title or the box around it when saving the canvas as a .png or .jpg.)
I tried using gStyle->SetOptTitle(0) before plotting anything on the canvas and nothing changed, along with a couple other things (setting title offset, etc.) but nothing seems to make a difference. Does anyone know how I can get my .pdf versions of canvases to not have that automatic title drawn on them?
Thank you for your help!

Yes this is weird.
Do you have a example macro reproducing this effect ?

Hey there, thanks for getting back to me!
I can produce a more minimal example later if need be, but the relevant part of the macro that produced this plot is here: https://github.com/eminizer/Reconstructor/blob/master/test/make_control_plots.py#L271-L359

Thanks for your reply.
I would prefer a minimal example (preferably in C++) reproducing the issue.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.