# TMultigraph with timeaxies

**URL:** <https://root-forum.cern.ch/t/tmultigraph-with-timeaxies/40636>\
**Category:** Newbie\
**Created:** [July 25, 2020, 6:52pm UTC](https://root-forum.cern.ch/t/tmultigraph-with-timeaxies/40636 "2020-07-25T18:52:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AaronZilbermann](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/a/ea666f/32.png) [@AaronZilbermann](https://root-forum.cern.ch/u/AaronZilbermann)\
**Post date:** [July 25, 2020, 6:52pm UTC](https://root-forum.cern.ch/t/tmultigraph-with-timeaxies/40636/1 "2020-07-25T18:52:35Z")

</div>

Hi, rooters.

I have some problem with Multigraph with timeaxies building.

I have two sets of data :

```auto
double time1[52]; // time points in hours
double value1[52];

```

and

```auto
double time2[118]; // time points in hours
double value2[118];

```

with different starting points :

```auto
TDatime da(2020,06,26,13,00,00);
TDatime da2(2020,06,29,9,00,00);

```

So, I am able to create two graphs apart. By that way :

```auto
TGraph *gr = new TGraph(jjj,time,value);
gr->Draw("APL*");
gr->GetXaxis()->SetTimeDisplay(1);
gr->GetXaxis()->SetNdivisions(205);
gr->GetXaxis()->SetTimeOffset(da.Convert());

gr->GetXaxis()->SetTitle("Real time [Day-hour]");
gr->GetYaxis()->SetTitle("Average Count rate [Hertz]");  

```

But I can’t understand how to create TMultigraph with these sets of data.

Could you help me, please.

---

<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 26, 2020, 4:29am UTC](https://root-forum.cern.ch/t/tmultigraph-with-timeaxies/40636/2 "2020-07-26T04:29:44Z")

</div>

Check out the [documentation](https://root.cern/doc/v622/classTMultiGraph.html). Try the first example they give - after filling the graphs, just create a TMultiGraph, Add the graphs to it and Draw the multigraph (not the graphs); you also can set the line colour, marker style, etc on each graph (not on the multigraph).
