The macro I attached to this help request creates a canvas, divides it into pads, and draws two dimensional histograms with the “colz” option in each pad. At the end I try to print the canvas as a GIF file, which fails with the error message:
Error in <TGX11TTF::WriteGIF>: can not create GIF of image containing more than 256 colors
How can I avoid this error and create the GIF file I need? Please don’t tell me to use another graphics format first and use external tools to convert into GIF, there are reasons why this won’t work for me.
I did some research by myself and found that everything works fine if I only reduce the number of pads. My theory is, that every single pad/histogram uses a color table of its own, so that there are indeed more than 256 colors in the whole image. Is this true and is there any way I can restrain all pads/histograms to use the same colors?
Thanks in advance for your help, Jörn.
make_gif.C (612 KB)