# 3D plot Z axis Range Setting invalid

**URL:** <https://root-forum.cern.ch/t/3d-plot-z-axis-range-setting-invalid/60688>\
**Category:** ROOT\
**Tags:** hist, root\
**Created:** [September 2, 2024, 10:42pm UTC](https://root-forum.cern.ch/t/3d-plot-z-axis-range-setting-invalid/60688 "2024-09-02T22:42:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yang](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/yang/32/37814_2.png) [@yang](https://root-forum.cern.ch/u/yang)\
**Post date:** [September 2, 2024, 10:42pm UTC](https://root-forum.cern.ch/t/3d-plot-z-axis-range-setting-invalid/60688/1 "2024-09-02T22:42:33Z")

</div>

![Screen Shot 2024-09-03 at 00.36.09](https://root-forum.cern.ch/uploads/default/original/3X/9/8/9890180e904421eea9f06e37ef214bfcc763075b.png)  
I want to draw these two 3D plots with the same scale, but it seems that SetRangeUser, SetAxisRange and SetLimits are all ineffective for a 3D plot. The Z axis range still changed automatically and uncontrollably.  
 ![Screen Shot 2024-09-03 at 00.36.48](https://root-forum.cern.ch/uploads/default/original/3X/9/4/944c965a07218906a73396efc6f474205e67269a.png)

---

<div class="post-metadata">

**Author:** ![linev](https://root-forum.cern.ch/letter_avatar_proxy/v4/letter/l/2bfe46/32.png) [@linev](https://root-forum.cern.ch/u/linev)\
**Post date:** [September 3, 2024, 6:20am UTC](https://root-forum.cern.ch/t/3d-plot-z-axis-range-setting-invalid/60688/2 "2024-09-03T06:20:51Z")

</div>

Try to specify minimum/maximum for the hstack like:

```auto
hhs->SetMinimum(0);
hhs->SetMaximum(15);

```

---

<div class="post-metadata">

**Author:** ![yang](https://root-forum.cern.ch/user_avatar/root-forum.cern.ch/yang/32/37814_2.png) [@yang](https://root-forum.cern.ch/u/yang)\
**Post date:** [September 3, 2024, 9:16am UTC](https://root-forum.cern.ch/t/3d-plot-z-axis-range-setting-invalid/60688/3 "2024-09-03T09:16:37Z")

</div>

Thanks a lot! It works.

---

<div class="post-metadata">

**Author:** ![system](https://root-forum.cern.ch/uploads/default/original/3X/e/f/efe4f24398fd8ffeb76bccb6ecc46d9d9c003376.png) [@system](https://root-forum.cern.ch/u/system)\
**Post date:** [September 17, 2024, 9:17am UTC](https://root-forum.cern.ch/t/3d-plot-z-axis-range-setting-invalid/60688/4 "2024-09-17T09:17:28Z")

</div>

Closed on September 17, 2024, 9:17am UTC

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.
