# Is it possible to change the distance between the two dimensional fit contours

**URL:** <https://root-forum.cern.ch/t/is-it-possible-to-change-the-distance-between-the-two-dimensional-fit-contours/58110>\
**Category:** Newbie\
**Tags:** hist, root\
**Created:** [February 9, 2024, 11:16am UTC](https://root-forum.cern.ch/t/is-it-possible-to-change-the-distance-between-the-two-dimensional-fit-contours/58110 "2024-02-09T11:16:34Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![gini](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/gini/32/29467_2.png) [@gini](https://root-forum.cern.ch/u/gini)\
**Post date:** [February 9, 2024, 11:16am UTC](https://root-forum.cern.ch/t/is-it-possible-to-change-the-distance-between-the-two-dimensional-fit-contours/58110/1 "2024-02-09T11:16:35Z")

</div>

Hi,

I have a two dimensional histogram which I fit using a two dimensional fit function (see figure below)

![Capture](https://root-forum.cern.ch/uploads/default/original/3X/1/3/13bc6d08425eb51be5473fe7ad03df109760add5.jpeg)

Here for visualization is it possible to adjust the distance between the different fit contours, for better visual representation ?

Thank you!

---

<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:** [February 9, 2024, 2:51pm UTC](https://root-forum.cern.ch/t/is-it-possible-to-change-the-distance-between-the-two-dimensional-fit-contours/58110/2 "2024-02-09T14:51:25Z")

</div>

I think you should use solid line to improve the visualisation

---

<div class="post-metadata">

**Author:** ![gini](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/gini/32/29467_2.png) [@gini](https://root-forum.cern.ch/u/gini)\
**Post date:** [February 9, 2024, 2:55pm UTC](https://root-forum.cern.ch/t/is-it-possible-to-change-the-distance-between-the-two-dimensional-fit-contours/58110/3 "2024-02-09T14:55:14Z")

</div>

The problem is if I use solid lines it somehow masks the data points …

![image](https://root-forum.cern.ch/uploads/default/original/3X/0/e/0e2a5aadc37907fba630a6867231cf0c1fc9d59f.png)

---

<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:** [February 9, 2024, 3:12pm UTC](https://root-forum.cern.ch/t/is-it-possible-to-change-the-distance-between-the-two-dimensional-fit-contours/58110/4 "2024-02-09T15:12:13Z")

</div>

yes but it is more clear. Change the number of contours to have less of them.

---

<div class="post-metadata">

**Author:** ![gini](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/gini/32/29467_2.png) [@gini](https://root-forum.cern.ch/u/gini)\
**Post date:** [February 9, 2024, 3:13pm UTC](https://root-forum.cern.ch/t/is-it-possible-to-change-the-distance-between-the-two-dimensional-fit-contours/58110/5 "2024-02-09T15:13:57Z")

</div>

How can I change the number of contours… all I have done is fit the distribution using a user-defined function…

---

<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:** [February 9, 2024, 3:31pm UTC](https://root-forum.cern.ch/t/is-it-possible-to-change-the-distance-between-the-two-dimensional-fit-contours/58110/6 "2024-02-09T15:31:39Z")

</div>

[https://root.cern/doc/master/classTF2.html#a308df5d8bcb343534ed8bf425b830780](https://root.cern/doc/master/classTF2.html#a308df5d8bcb343534ed8bf425b830780)
