# How to bring a slider value to a new graph

**URL:** <https://cl.desmos.com/t/how-to-bring-a-slider-value-to-a-new-graph/386>\
**Category:** Questions\
**Created:** [February 8, 2019, 7:12pm UTC](https://cl.desmos.com/t/how-to-bring-a-slider-value-to-a-new-graph/386 "2019-02-08T19:12:40Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jodi\_Donald](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/jodi_donald/32/3511_2.png) [@Jodi\_Donald](https://cl.desmos.com/u/Jodi_Donald)\
**Post date:** [February 8, 2019, 7:12pm UTC](https://cl.desmos.com/t/how-to-bring-a-slider-value-to-a-new-graph/386/1 "2019-02-08T19:12:41Z")

</div>

On my first slide, the student uses a slider to move “a” and “b” for the equation of a line.

I want to bring those values to a fourth slide and square the linear function the student created in the first slide and show its graph.

Struggling how to code that and would love assistance.

---

<div class="post-metadata">

**Author:** ![sergeballif](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/sergeballif/32/231_2.png) [@sergeballif](https://cl.desmos.com/u/sergeballif)\
**Post date:** [February 9, 2019, 1:27am UTC](https://cl.desmos.com/t/how-to-bring-a-slider-value-to-a-new-graph/386/2 "2019-02-09T01:27:25Z")

</div>

You’ll want to name the first graph component `g1` and then on the fourth slide you can call the values of `a` and `b` from `g1` in the CL code using

```auto
number("a"): g1.number("a")
number("b"): g1.number("b")

```

while entering the formula for the function inside the calculator itself. Here’s an example implementation. [Square function example • Activity Builder by Desmos](https://teacher.desmos.com/activitybuilder/custom/5c5e2b31eded5361a00832de)

---

<div class="post-metadata">

**Author:** ![Jodi\_Donald](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/jodi_donald/32/3511_2.png) [@Jodi\_Donald](https://cl.desmos.com/u/Jodi_Donald)\
**Post date:** [February 20, 2019, 8:46pm UTC](https://cl.desmos.com/t/how-to-bring-a-slider-value-to-a-new-graph/386/3 "2019-02-20T20:46:04Z")

</div>

Thank you so much. It was a perfect fix.

---

<div class="post-metadata">

**Author:** ![Emily\_Sliman](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/emily_sliman/32/417_2.png) [@Emily\_Sliman](https://cl.desmos.com/u/Emily_Sliman)\
**Post date:** [November 7, 2019, 1:36am UTC](https://cl.desmos.com/t/how-to-bring-a-slider-value-to-a-new-graph/386/4 "2019-11-07T01:36:33Z")

</div>

This is no longer working as a solution from a graph to a graph. Here’s what I came up with to reference the value as part of content. Not sure if changing the colon to an equal would work within the graph too…?

b1=graphpart3.number(“b\_1”)

content: “Your second estimation on the previous slide was ${b1}.”

---

<div class="post-metadata">

**Author:** ![JayChow](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/jaychow/32/1674_2.png) [@JayChow](https://cl.desmos.com/u/JayChow)\
**Post date:** [November 8, 2019, 2:14am UTC](https://cl.desmos.com/t/how-to-bring-a-slider-value-to-a-new-graph/386/5 "2019-11-08T02:14:58Z")

</div>

It looks like you’re trying to define some content. That sink only works in a note component, so adding a note and copying exactly what you have there into the noteShould print the text.

---

<div class="post-metadata">

**Author:** ![tyler\_haslam](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/tyler_haslam/32/1071_2.png) [@tyler\_haslam](https://cl.desmos.com/u/tyler_haslam)\
**Post date:** [December 21, 2020, 9:13pm UTC](https://cl.desmos.com/t/how-to-bring-a-slider-value-to-a-new-graph/386/6 "2020-12-21T21:13:42Z")

</div>

Anyone know if its possible to set the initial value of a slider to a value from another slider in another graph, but still allow it to slide after that?

---

<div class="post-metadata">

**Author:** ![JAC9186](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/jac9186/32/5018_2.png) [@JAC9186](https://cl.desmos.com/u/JAC9186)\
**Post date:** [December 24, 2020, 7:17pm UTC](https://cl.desmos.com/t/how-to-bring-a-slider-value-to-a-new-graph/386/7 "2020-12-24T19:17:47Z")

</div>

You can if your new slider is a two-variable slider. For instance, let’s say you have a point … you could make the coordinates (x1 + x01, y1 + y01). You could set x01 and y01 equal to 0 in the graph itself, and you could make x1 and y1 the value or the previous screen using a number sink. That way the user is moving the point from wherever (x1,y1) was set to before.
