Superimposition of two TGraph2D with different color sets

Hi,

I would like to know if it is possible to superimpose a TGraph2D made with a specific colored palette, and another TGraph2D made with a greyscale palette.

I tried a lot, but I did not manage to do that. Any idea?

Thanks,
Alexandre

Sometimes it is possible.
You have to draw with color pallet and update (!!!) the image
gPad->Modified(), gPad->Update() should do the job.
Then carfully :wink: change the palette and draw the second image (I would advice to use a dedicated TCanvas).

The result will be fragile :blush: though. This means as soon as you “touch” your former TCanvas it is to be redrawn with the later TCanvas palette :open_mouth:

Can you check whether it works for you?

Also have a look at:

root.cern.ch/phpBB2/viewtopic.ph … ight=texec

Yes, this should help. However the result is still fragile. As soon as the number of the TCanvas more then two one should not have forgotten to apply the approach root.cern.ch/phpBB2/viewtopic.ph … ight=texec for each :exclamation: TCanvas in his/her application.

Thank you, I will try what you proposed me as soon as possible!

Alexandre