Saving Canvas as C File Changes Colors (Seems Irreversible)

I have saved a large number of plots as .C files. I’ve encountered a strange problem when I redraw them though. The colors of one of the curves changes when I redraw the canvas.

I’ve attached an example.

On my machine, the “0.5 GeV” curve should be black but it comes out dark blue, and in the legend its still black. I’ve literally gone through this code and changed every instance of SetLineColor(something) to SetLineColor(1) and the other pair of curves become black but the first curve is still drawn as dark blue.


Basic_C_SigmaM_Q2.C (49.5 KB)

Please read tips for efficient and successful posting and posting code

ROOT Version: 6.18/04
Platform: Ubuntu 18.04.5
Compiler: GCC 7.5.0

I am not sure which one is the 1st curve so I modified your macro to make them all black. Search fro kBlack and change to the colour you need.
Basic_C_SigmaM_Q2.C (49.0 KB)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.