Good evening, dear rooters.
I have some problem with TLegend. How I can plot TLegend color same as data points color? Sorry, for my english.9B_40MeV.pdf (18.5 KB) mass2.C (2.0 KB) 9Be_elas_40Mev.txt (1.1 KB) 9B_gs_40MeV.txt (1.1 KB)
1 - There is no SetMarkerColor for TLegend, so delete that line.
2 - Your graphs don’t have names, so you should use the name of the TGraph objects (variables); in this case, remove the quotations when adding them to the TLegend: