Blank eps output when setting palette

Hello

After manually adjusting features in a Cont4 histogram, I tried to write out to an eps file using “File->Save->c1.eps”. The eps output shows the histogram axis, but the contents are completely white.

For this output I wanted greyscale, so I used the following,

  Int_t ncol = 20;
  Int_t colors[ncol];
  TColor *col;
  Double_t dg=1/(Double_t)ncol;
  Double_t grey=ncol;
  for (Int_t i=0; i<ncol; i++) {
     colors[i]= i+100;
     col = gROOT->GetColor(colors[i]);
     col->SetRGB(grey, grey, grey);
     grey = grey-dg;
  }
  gStyle->SetPalette(ncol,colors);

If I comment this out, my eps output is fine. Any suggestions?

As an aside, while trying to sort this out, I converted my histogram to a TImage and tried the StartPaletteEditor() functionality. What a great tool, especially for pre-publication work. Unfortunately, upon conversion the TImage only shows up in pixellated form. Would it be possible to create a StartPaletteEditor() type function for a cont4 contoured histogram?

Thanks

Anthony Faust

I have tried to reproduce your problem with the attached example. This example gives the attached eps output which is fine. Do you have some running example showing the wrong behaviour you observed ?
c1.eps.gz (47.8 KB)
grey.C (493 Bytes)

Ok, your grey.C works for me as well.

Now I would actually like an inverted grey scale (ie, black hot), which I attempted in invgrey.C . This file recreates my problem; the histogram is rendered ok, but save->c1.eps creates the blanked output.

Thanks for your help

Anthony
invgrey.C (496 Bytes)

you should do:

Double_t grey=1;

(you put 100).

Thanks