# Error in compiling Draw(TString::Format)

**URL:** <https://root-forum.cern.ch/t/error-in-compiling-draw-tstring-format/53133>\
**Category:** Newbie\
**Tags:** hist, root\
**Created:** [January 16, 2023, 10:34pm UTC](https://root-forum.cern.ch/t/error-in-compiling-draw-tstring-format/53133 "2023-01-16T22:34:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![thegame](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/e495f1/32.png) [@thegame](https://root-forum.cern.ch/u/thegame)\
**Post date:** [January 16, 2023, 10:34pm UTC](https://root-forum.cern.ch/t/error-in-compiling-draw-tstring-format/53133/1 "2023-01-16T22:34:18Z")

</div>

Hi everyone, I’m trying to run the macro with the following command.

```auto
ch1->Draw(TString::Format("F3PLA_TR_ns - F3PLA_TL_ns: (1-%f)/TMath::Sqrt(F3PLA_QL)", slope1)>>hist1,"(PPACX[0][3]>4.5 && PPACX[0][3]<5.5)","colz");
hist1->Fit("fit","","",0.033,0.039);

```

now what I’m trying to do there is to plot a 2D histo of (A-B) : (1-f)/Q where A, B and Q are different branches of the tree. and f is a double obtained by fit2-\>GetParameter(1);

The error I’m getting is something like this:

```auto
 /usr/include/c++/7/iomanip:418:5: note: candidate template ignored: could not match 'basic_istream<type-parameter-0-0, type-parameter-0-1>' against 'TString'
    operator>>(basic_istream<_CharT, _Traits>& __is, _Get_time<_CharT>__ f)

```

Any suggestions on how to get rid of this or any other suggestions about plotting a 2D histo of (A-B) : (1-f)/Q?

THANKS!

---

<div class="post-metadata">

**Author:** ![Wile\_E\_Coyote](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/wile_e_coyote/32/12417_2.png) [@Wile\_E\_Coyote](https://root-forum.cern.ch/u/Wile_E_Coyote)\
**Post date:** [January 16, 2023, 10:50pm UTC](https://root-forum.cern.ch/t/error-in-compiling-draw-tstring-format/53133/2 "2023-01-16T22:50:32Z")

</div>

`ch1->Draw(TString::Format("F3PLA_TR_ns - F3PLA_TL_ns : (1-%f)/TMath::Sqrt(F3PLA_QL) >> hist1", slope1), "(PPACX[0][3]>4.5 && PPACX[0][3]<5.5)", "colz");`
