TImage rendered in black in batch, not in interactive mode

Hello rooters,

I have a problem with one of my root macro where I draw a 2D histogram and its x and y projections. In order to have the y projection in the right direction (see figure 1), I create a TImage of this y projection histogram that I rotate with the command “img->Flip(90);” (see example.cpp). Then, I save the image with the .ps format.

My macro works in interactive mode (see figure 1) but in batch mode (-b) I have a black rectangle instead of my rotated image (see figure 2). If I remove the “img->Flip(90);” command, the black rectangle disappears (see figure 3).

I use:
ROOT 5.34/08 (v5-34-08@v5-34-08, Jun 05 2013, on linuxx8664gcc)
CINT/ROOT C/C++ Interpreter version 5.18.00

could you help me?

best regards.
figure3.ps (168 KB)
figure2.ps (113 KB)
figure1.ps (155 KB)
example.cpp (1.39 KB)

I am looking.

When I run you macro in interactive mode I get the attached picture.
It is what you want ?

Sorry, I forgot to remove the comment in my macro at the line 60. Remove the “//”.
I want to get a result like the figure 1.

Yes there is a problem in batch mode. I see the same with png.
I have no answer yet, unless using interactive mode.

Hello Mr. Couet,

Do you have time to take a look at my problem in batch mode?

I asked the author of this code to look at it. No progress for me yet.
The only way right now is to not run in batch mode.

Thank you for the news and for your help.