# How to plot any equation using a limiting value of coordinate

**URL:** <https://root-forum.cern.ch/t/how-to-plot-any-equation-using-a-limiting-value-of-coordinate/42188>\
**Category:** Newbie\
**Created:** [November 9, 2020, 7:02pm UTC](https://root-forum.cern.ch/t/how-to-plot-any-equation-using-a-limiting-value-of-coordinate/42188 "2020-11-09T19:02:32Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dsubhro](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/dsubhro/32/24279_2.png) [@dsubhro](https://root-forum.cern.ch/u/dsubhro)\
**Post date:** [November 9, 2020, 7:02pm UTC](https://root-forum.cern.ch/t/how-to-plot-any-equation-using-a-limiting-value-of-coordinate/42188/1 "2020-11-09T19:02:33Z")

</div>

_ROOT Version:_ 6.22  
_Platform:_ Root

* * *

I want to plot a cylinder of equation x^2+y^2 = 25 for the value of -10 \< z \< 10.  
and at other value of z(along the axis), there will not be any cylindrical structure.  
but when I put f1 = new TF3(“name”, “x^2+y^2 = 25”, -10,10,-10,10,-10,10), I got a fully infinite cylinder.  
What parameter should I use to fix this? Withouot generating datapoints will be more efficient.  
Thank you. Regards.

---

<div class="post-metadata">

**Author:** ![jblomer](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/j/439d5e/32.png) [@jblomer](https://root-forum.cern.ch/u/jblomer)\
**Post date:** [November 9, 2020, 9:07pm UTC](https://root-forum.cern.ch/t/how-to-plot-any-equation-using-a-limiting-value-of-coordinate/42188/2 "2020-11-09T21:07:33Z")

</div>

Hello,

Could you send your macro with the `TF3` code? From the snippet I cannot reproduce what you see.

Cheers,  
Jakob
