# Can you use a variable to set the scale of a graph

**URL:** <https://cl.desmos.com/t/can-you-use-a-variable-to-set-the-scale-of-a-graph/4444>\
**Category:** Questions\
**Created:** [September 8, 2022, 8:20am UTC](https://cl.desmos.com/t/can-you-use-a-variable-to-set-the-scale-of-a-graph/4444 "2022-09-08T08:20:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![FleetFoot](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/fleetfoot/32/3750_2.png) [@FleetFoot](https://cl.desmos.com/u/FleetFoot)\
**Post date:** [September 8, 2022, 8:20am UTC](https://cl.desmos.com/t/can-you-use-a-variable-to-set-the-scale-of-a-graph/4444/1 "2022-09-08T08:20:59Z")

</div>

I’m plotting a curve in the graphing calculator that has a wide range depending on a user slider. What I’d like to do is find the peak then round it to a slightly higher number (no problem so far) then use that to set the upper limit of the graph scale. Is there a way to reference a variable in the graph settings?

---

<div class="post-metadata">

**Author:** ![Daniel\_Wekselgreene](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_wekselgreene/32/1819_2.png) [@Daniel\_Wekselgreene](https://cl.desmos.com/u/Daniel_Wekselgreene)\
**Post date:** [September 8, 2022, 6:15pm UTC](https://cl.desmos.com/t/can-you-use-a-variable-to-set-the-scale-of-a-graph/4444/2 "2022-09-08T18:15:15Z")

</div>

Here is an example of using bounds: makebounds() to do this. But it requires working inside an activity. I’m not sure if you can do it just in the grapher.

> **[zoom • Activity Builder by Desmos](https://teacher.desmos.com/activitybuilder/custom/631a2f71b5c5fa0643bcb548)**
>
> by Daniel Wekselgreene
