TCanvas->SaveAs() problem

Good morning,

in our group we built a c++ application for our analysis including the ROOT libraries.
I say this because I’m not using plain ROOT.

I have a problem when I try to save a Canvas on a file. I use tCanvas->SaveAs(). If I specify a “GIF” file, everything works well; but with other format (I tried PS, EPS, root, PNG) I get on the picture only the content of one bin!

I attached two file: the gif represents the Canvas perfectly, the eps shows only the content of the second bin.

Can you suggest me any idea to solve this?

Thanks a lot in advance!

Have a nice day,

Riccardo.

Sorry, here is the second attach :wink:

Ric.

d_mEff_l_3j_MT_dphicut.ps (10.4 KB)

Which ROOT version are you using ?
I know you are not using interactive ROOT, but can you send a piece of code (or better a macro) reproducing the problem ?

Thanks a lot for you answer!
The version is 5.17.

It’s difficult to post a macro or a piece of code, the application uses many c++ custom classes.
I tried to debug the application but it took to me too much time.

At the end I create a new plotting function and now it works fine, the .eps file looks exactly like the .gif file.

I didn’t understand where was the bug; thus, I’m sorry, this can’t be useful to other people. Sorry.

Ric.