Draw graph

Hi Everybody
I had write this script which is read two txt files and draw between columns it has 4 drawn plots
the problem that how i can put the names on each line in the graph

[code]
#include “TTree.h”
#include “TFile.h”

void try2()
{
TFile *ftree = new TFile(“tree_nucnet2.root”, “recreate”);
TTree *prop = new TTree(“properties”, “”);
prop->ReadFile("/home/mohammed/Desktop/o15_Abundances/03_properties.txt",“sequence/F:Time:Temperature:Density”);
// Write, Scan and Print the Tree
prop->Write();
prop->Scan();
prop->Print();
// creation of the secound TTree
TTree *mass = new TTree(“masses”, “”);
// creation and filling of branches to hold the variables
mass->ReadFile("/home/mohammed/Desktop/o15_Abundances/02_all_o_masses.txt",“sequence/F:o15_mass:o16_mass:o17_mass:o18_mass:o19_mass”);
// open ROOT file
//TFile *ftree1 = new TFile(“tree1_nucnet.root”, “recreate”);
// Write, Scan and Print the Tree
mass->Write();
mass->Scan();
mass->Print();

prop->AddFriend(mass);
prop->Draw(“o16_mass:Time”, “”,“SAME line”);
prop->Draw(“o17_mass:Time”, “”,“SAME line”);
prop->Draw(“o18_mass:Time”, “”,“SAME line”);
prop->Draw(“o19_mass:Time”, “”,“SAME line”);
}[/code]
03_properties.txt (20.4 KB)
02_all_o_masses.txt (20.3 KB)

Hi,

if you wish a legend, perhaps this is the best class to rely on root.cern.ch/doc/master/classTLegend.html
If, on the other hand, you’d like to write above the lines a piece of text, you could rely on root.cern.ch/doc/master/classTLatex.html