当前位置: 首页>>代码示例>>C++>>正文


C++ TF1::SetLineColorAlpha方法代码示例

本文整理汇总了C++中TF1::SetLineColorAlpha方法的典型用法代码示例。如果您正苦于以下问题:C++ TF1::SetLineColorAlpha方法的具体用法?C++ TF1::SetLineColorAlpha怎么用?C++ TF1::SetLineColorAlpha使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TF1的用法示例。


在下文中一共展示了TF1::SetLineColorAlpha方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: draw_clouds_profiles


//.........这里部分代码省略.........
        profile = hist2D->ProfileX();    //(TProfile*)f[0]->Get( Form("hist2D_c%.1f-%.1f_etaW_%d_phiW_%d_pfx", cBinMin, cBinMax, etaW, phiW) );
        if ( kCorrType == 0 )
        {
            profile->SetTitle( "");
            profile->GetYaxis()->SetTitle( "#LTN_{ch}#GT Backward");
            profile->GetXaxis()->SetRangeUser(0,650);
            profile->GetYaxis()->SetRangeUser(0,650);
        }
        else if ( kCorrType == 1 )
        {
            profile->SetTitle( "");
            profile->GetYaxis()->SetTitle( "#LT#LTp_{T}#GT#GT Backward");
        }
        profile->SetLineColor(kOrange-9+cBin);
        profile->SetMarkerStyle(7);
        tuneProfile_onPad( profile );
        profile->GetYaxis()->CenterTitle();

        deleteProfileEmptyBinErrors(profile);


        canv_tmp_for_fit->cd();
        profile->Fit("pol1","Q");//,"",0.25,1.2);//,"N");
        canv_2D_clouds->cd(2);

        TF1 *fit = profile->GetFunction("pol1");
        Double_t p0 = fit->GetParameter(0);
        Double_t p1 = fit->GetParameter(1);
        grFromFit2D->SetPoint(grFromFit2D->GetN(), (cBinMax+cBinMin)/2, p1);

        double meanX = hist2D->ProjectionX()->GetMean();
        double rmsX = hist2D->ProjectionX()->GetRMS();
        fit->SetRange( meanX-3*rmsX, meanX+3*rmsX );
        fit->SetLineColorAlpha( kRed, 0.6 );

        fit->Draw("same");

        profile->DrawCopy( firstDraw ? "" : "same" );



        firstDraw = false;
    }

    TGraphErrors *grByFormula; /*[cW][etaW]*/
    if ( kCorrType == 0 )
    {
        grByFormula = (TGraphErrors*)f[0]->Get( Form( "grNN_c%d_eta%d", cW, etaW ) );
    }
    else if ( kCorrType == 1 )
    {
        grByFormula = (TGraphErrors*)f[0]->Get( Form( "grPtPt_c%d_eta%d", cW, etaW ) );
    }



    TCanvas *canv_GrCoeff = new TCanvas("canv_GrCoeff","canv_GrCoeff",20,150,900,700 );
    grByFormula->Draw("APL");

    grFromFit2D->SetLineColor(kRed);
    grFromFit2D->DrawClone("PL");



    return;
开发者ID:altsybee,项目名称:ALICE_NN_PtPt_2016,代码行数:66,代码来源:draw_clouds_profiles.C


注:本文中的TF1::SetLineColorAlpha方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。