# Appearance of point on Graph

**URL:** <https://root-forum.cern.ch/t/appearance-of-point-on-graph/40657>\
**Category:** Newbie\
**Created:** [July 27, 2020, 3:58am UTC](https://root-forum.cern.ch/t/appearance-of-point-on-graph/40657 "2020-07-27T03:58:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![hammiu](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/hammiu/32/20395_2.png) [@hammiu](https://root-forum.cern.ch/u/hammiu)\
**Post date:** [July 27, 2020, 3:58am UTC](https://root-forum.cern.ch/t/appearance-of-point-on-graph/40657/1 "2020-07-27T03:58:15Z")

</div>

I have a file with errors. I want to that on the canvas appear just Points, NOT line between points.  
I have an example.

```auto
#include <TGraph.h>
void alo()
{
    double x[3] = {1.0, 2.0 ,3.0};
    double y[3]= {2.1, 4.1, 6.3};
    TGraph *g = new TGraph(3, x, y);
    g->Draw();
    g->SetMarkerColor(kRed);
    g->SetMarkerStyle(8);
}

```

 ![Screenshot_1](https://root-forum.cern.ch/uploads/default/original/3X/6/6/669c7ce0d6f14d418065adf111b9664a8564ecec.png)  
Could you help me, please? Maybe, I need to change to other Class?

---

<div class="post-metadata">

**Author:** ![dastudillo](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dastudillo/32/17280_2.png) [@dastudillo](https://root-forum.cern.ch/u/dastudillo)\
**Post date:** [July 27, 2020, 4:06am UTC](https://root-forum.cern.ch/t/appearance-of-point-on-graph/40657/2 "2020-07-27T04:06:46Z")

</div>

Use

```auto
g->Draw("AP");

```

[https://root.cern/doc/master/classTGraphPainter.html#GP01](https://root.cern/doc/master/classTGraphPainter.html#GP01)

---

<div class="post-metadata">

**Author:** ![hammiu](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/hammiu/32/20395_2.png) [@hammiu](https://root-forum.cern.ch/u/hammiu)\
**Post date:** [July 27, 2020, 4:11am UTC](https://root-forum.cern.ch/t/appearance-of-point-on-graph/40657/3 "2020-07-27T04:11:39Z")

</div>

Thank you. It works perfectly.
