I’ve moved to v5.15.08 and get a segmentation fault when I run the attached macro.
The attached macro is a section of a larger macro which sets the colours I want to use in a contour plot and works fine in v5.11.02.
The problem appears to be the col->SetRGB(double, double, double) command.
I can call it interactively:
TColor* col;
col = gROOT->GetColor(100);
col->SetRGB(0,0,0);
But it dies in the macro :(.
Does anyone have any ideas why the seg fault occurs and how I might correct the macro so it retains the same funtionality?
Color management has changed. Now the colors above 100 are not created as before. Therefore gROOT->GetColor() returns 0 because the color does not exist. The following macro takes this into account: