# How to superimpose two leafs from two root files

**URL:** <https://root-forum.cern.ch/t/how-to-superimpose-two-leafs-from-two-root-files/50856>\
**Category:** Newbie\
**Tags:** tree\
**Created:** [July 19, 2022, 1:51pm UTC](https://root-forum.cern.ch/t/how-to-superimpose-two-leafs-from-two-root-files/50856 "2022-07-19T13:51:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gurmukh\_dhindsa](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/gurmukh_dhindsa/32/30326_2.png) [@gurmukh\_dhindsa](https://root-forum.cern.ch/u/gurmukh_dhindsa)\
**Post date:** [July 19, 2022, 1:51pm UTC](https://root-forum.cern.ch/t/how-to-superimpose-two-leafs-from-two-root-files/50856/1 "2022-07-19T13:51:14Z")

</div>

I have two root files that have leaf -\>Qdet. Now I want to superimpose these two leaf’s data and look them into a new canvas. How I can do that?

_ROOT Version:_ Not Provided  
_Platform:_ Not Provided  
_Compiler:_ g++

* * *

---

<div class="post-metadata">

**Author:** ![jalopezg](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/jalopezg/32/25844_2.png) [@jalopezg](https://root-forum.cern.ch/u/jalopezg)\
**Post date:** [July 19, 2022, 8:07pm UTC](https://root-forum.cern.ch/t/how-to-superimpose-two-leafs-from-two-root-files/50856/2 "2022-07-19T20:07:17Z")

</div>

Hi @gurmukh_dhindsa,

Could you elaborate more on what you intend to achieve? IIUC, you are probably looking for `TMultiGraph`. In principle, you should add the corresponding `TGraph` instances to the multi-graph.

For more information, refer to the manual page [here](https://root.cern/doc/master/classTMultiGraph.html), documentation on the [reference guide](https://root.cern/doc/master/classTMultiGraph.html), and [tutorials](https://root.cern/doc/master/group __tutorial__ graphs.html).

Cheers,  
J.
