# Plotting slopes without data points

**URL:** <https://root-forum.cern.ch/t/plotting-slopes-without-data-points/33751>\
**Category:** Newbie\
**Created:** [April 24, 2019, 4:15pm UTC](https://root-forum.cern.ch/t/plotting-slopes-without-data-points/33751 "2019-04-24T16:15:17Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thabo\_Lepota](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/58956e/32.png) [@Thabo\_Lepota](https://root-forum.cern.ch/u/Thabo_Lepota)\
**Post date:** [April 24, 2019, 4:15pm UTC](https://root-forum.cern.ch/t/plotting-slopes-without-data-points/33751/1 "2019-04-24T16:15:17Z")

</div>

Dear all,

Can you please assist, i wanna plot slopes with its parameters (po,p1) only and exclude the data points  
This is the code i’m using to plot [basichist.c](https://root-forum.cern.ch/uploads/default/original/3X/9/3/9313f86c08a4cf08c6a025a5f213ba3d8c936e87.c) (5.0 KB)  
[19-03-16-2.zip](https://root-forum.cern.ch/uploads/default/original/3X/7/5/75c958a540fee3590dcb1c4a10e1cc65b5b9f2b3.zip) (1.5 MB)

thank you in advance.

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [April 25, 2019, 8:25am UTC](https://root-forum.cern.ch/t/plotting-slopes-without-data-points/33751/2 "2019-04-25T08:25:14Z")

</div>

[basichist.c](https://root-forum.cern.ch/uploads/default/original/3X/b/6/b63e6736c461a36ce379b56715c5cf9265f4a8b4.c) (4.7 KB)

 ![41](https://root-forum.cern.ch/uploads/default/original/3X/b/9/b9d75c33f17df73f43a63d342e7c3ccc6950d138.jpeg)

---

<div class="post-metadata">

**Author:** ![Thabo\_Lepota](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/58956e/32.png) [@Thabo\_Lepota](https://root-forum.cern.ch/u/Thabo_Lepota)\
**Post date:** [April 25, 2019, 9:33am UTC](https://root-forum.cern.ch/t/plotting-slopes-without-data-points/33751/3 "2019-04-25T09:33:42Z")

</div>

So doing so, the errors are excludes is there a way to include them?

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [April 25, 2019, 9:38am UTC](https://root-forum.cern.ch/t/plotting-slopes-without-data-points/33751/4 "2019-04-25T09:38:38Z")

</div>

So you want the errors and the line ? … You ma ro was doing exactly that before…  
I thought you wanted only the line…

---

<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:** [April 25, 2019, 9:53am UTC](https://root-forum.cern.ch/t/plotting-slopes-without-data-points/33751/5 "2019-04-25T09:53:16Z")

</div>

```auto
   t->DrawLatexNDC(0.6, 0.7, Form("p0 = %g #pm %g", f->GetParameter(0), f->GetParError(0)));
   t->DrawLatexNDC(0.6, 0.65, Form("p1 = %g #pm %g", f->GetParameter(1), f->GetParError(1)));

```

---

<div class="post-metadata">

**Author:** ![Thabo\_Lepota](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/t/58956e/32.png) [@Thabo\_Lepota](https://root-forum.cern.ch/u/Thabo_Lepota)\
**Post date:** [April 25, 2019, 12:37pm UTC](https://root-forum.cern.ch/t/plotting-slopes-without-data-points/33751/6 "2019-04-25T12:37:24Z")

</div>

i want just a best fit line and displaying them like Po = 199.234+/-0.0556 and P1 = 1.568e06+/- 0.01545 something along those lines

---

<div class="post-metadata">

**Author:** ![couet](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/couet/32/12037_2.png) [@couet](https://root-forum.cern.ch/u/couet)\
**Post date:** [April 25, 2019, 12:44pm UTC](https://root-forum.cern.ch/t/plotting-slopes-without-data-points/33751/7 "2019-04-25T12:44:14Z")

</div>

> [@Thabo\_Lepota](#):
>
> i want just a best fit line and displaying them like Po = 199.234+/-0.0556 and P1 = 1.568e06+/- 0.01545 something along those lines

@Wile_E_Coyote post should be the answer.
