void calendar_horizontal(Int_t lYear = 2023){ //Initialize: //TDatime (Int_t year, Int_t month, Int_t day, Int_t hour, Int_t min, Int_t sec) gStyle->SetLineScalePS(1); TCanvas *c1 = new TCanvas("c1", "", 3*420,3*297); c1->SetFrameFillStyle(0); c1->SetFillStyle(0); c1->Range(-0.1,-0.1,1.1,1.1); TLatex *lLat = new TLatex(); lLat->SetTextAlign(22); //lLat->SetTextFont(42); lLat->SetTextSize(0.05); lLat->DrawLatex(0.5,1.04,Form("%i", lYear)); for(Int_t lMonth = 1; lMonth<18; lMonth++){ cout<<"Drawing month number "<SetTextAlign(22); lLat->SetTextFont(42); lLat->SetTextSize(0.010); //Double_t lx1 = 0.02+0.1371/5*lDayOfMonth; lLat->SetTextSize(0.0133); for(Int_t jj=1; jj<7*5+3; jj++) lLat->DrawLatex(0.02+0.1371/5*jj,0.965,lDayName[jj%7].Data()); lLat->SetTextSize(0.01); TDatime date(lYear+(lMonth/12),lMonth%12,1,12,0,0); cout<<"Initial date: "<SetTextSize(0.075); TString lDrawMonthYear = lMonthNameFull[(lMonth-1)%12]; //lDrawMonthYear.Append(Form(" %i",date.GetYear())); lLat->SetTextAlign(12); lLat->SetTextSize(0.01); Int_t lWeeksDrawn=1; Double_t ly1 = 1-0.06*lMonth; lLat->SetTextSize(0.0133); lLat->DrawLatex(-0.04,ly1-(0.031*0.5),lDrawMonthYear); lLat->SetTextSize(0.01); lLat->SetTextAlign(22); cout<<"Y for this: "<SetTextAlign(22); while(lMonth==lThisMonth){ Int_t lDayOfWeek = date.GetDayOfWeek(); if(lDayOfWeek==7) lDayOfWeek=0; Double_t lx1 = 0.02+0.1371/5*lDayOfMonth; if(lDayOfWeek==0&&lFirstDay==kFALSE){ ly1=ly1; lWeeksDrawn++; } lLat->DrawLatex(lx1,ly1,Form("%i",date.GetDay())); //Draw date box Double_t lWidth = 0.1371/10; Double_t lBoxX1 = lx1-lWidth; Double_t lBoxX2 = lx1+lWidth; Double_t lBoxY1 = ly1-0.039; Double_t lBoxY2 = ly1+0.008; lDayBox[lNBoxes] = new TBox(lBoxX1,lBoxY1,lBoxX2,lBoxY2); lDayBox[lNBoxes]->SetFillStyle(0); lDayBox[lNBoxes]->SetLineColor(kBlack); if(lDayOfWeek!=0&&lDayOfWeek!=6) lDayBox[lNBoxes]->SetLineWidth(2); lDayBox[lNBoxes]->Draw(); //cout<<"At day: "<SaveAs(Form("calendar_%i.pdf", lYear)); }