# Plotting graphs with manipulate: empty plots

**URL:** <https://community.wolfram.com/t/plotting-graphs-with-manipulate-empty-plots/18329>\
**Category:** Questions\
**Tags:** calculus, graphics-and-visualization\
**Created:** [June 23, 2021, 12:14pm UTC](https://community.wolfram.com/t/plotting-graphs-with-manipulate-empty-plots/18329 "2021-06-23T12:14:25Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![henrieluiskueppers](https://avatars.discourse-cdn.com/v4/letter/h/7ba0ec/32.png) [@henrieluiskueppers](https://community.wolfram.com/u/henrieluiskueppers)\
**Post date:** [June 23, 2021, 12:14pm UTC](https://community.wolfram.com/t/plotting-graphs-with-manipulate-empty-plots/18329/1 "2021-06-23T12:14:25Z")

</div>

Hello Together,

I am currently working on visualizing my results with the help of Mathematica. There is mainly one Problem (I think) and that has to do with the manipulate order.

1.) What do I have to calculate?  
Physics apart the formulas I have to calculate look like this

[Open in Wolfram Cloud ↗](https://www.wolframcloud.com/obj/a3124b5e-ea12-4ffa-b836-b1f475b00d0c)

Now I know that the last 3 Integrals can not be calculated by the System because they have unspecified parameters. So I calculated it one time for g=w=1 and d=0.5. I just defined the Functions:

```
l[x_]=ArcCos[0.9841229182759271+0.0158770817240729*Cos[x]]

```

(wich is o for the parameters above)

```
g[t_]=Sqrt[-1/8 (-1+Sqrt[1-0.5^2])(3-Cos[2 *t])]

```

(which is Sqrt[k] for the parameters above)

and evaluated the Integral of g with

f[y\_]:=NIntegrate[g[t],{t,0,y}]

Then I plotted my wanted function

Plot[x\*l[x]/f[x],{x,0,10}]

 ![plot.PNG](https://global.discourse-cdn.com/wolfram/original/3X/7/b/7b278407b8c769f7f8992320fb819dc0a93316bf.png)

Now the stuff I need help with:

The thing is that I would like a shortcut to the plot and the option to manipulate the parameters g, w and d afterwards. I tried the following:

◔

But I don’t get any results. I think the parameters are the problem so the system cannot solve the numerical Integral for n. I am grateful for any help.

Regards,

Henrie

---

<div class="post-metadata">

**Author:** ![rohitnamjoshi](https://avatars.discourse-cdn.com/v4/letter/r/f1d935/32.png) [@rohitnamjoshi](https://community.wolfram.com/u/rohitnamjoshi)\
**Post date:** [June 23, 2021, 6:47pm UTC](https://community.wolfram.com/t/plotting-graphs-with-manipulate-empty-plots/18329/2 "2021-06-23T18:47:47Z")

</div>

Not clear what you are trying to accomplish. A `Manipulate` is being passed to `Plot`.

```
k[y_] := Manipulate[NIntegrate[...
Manipulate[Plot[k[x]...

```

---

<div class="post-metadata">

**Author:** ![henrieluiskueppers](https://avatars.discourse-cdn.com/v4/letter/h/7ba0ec/32.png) [@henrieluiskueppers](https://community.wolfram.com/u/henrieluiskueppers)\
**Post date:** [June 24, 2021, 7:03am UTC](https://community.wolfram.com/t/plotting-graphs-with-manipulate-empty-plots/18329/3 "2021-06-24T07:03:36Z")

</div>

Thank you for your answer.

I think the problem that I have lies within the computation of the Integral of n[x]:k[x]. I need k[x] to plot the Graph but there are some parameters in k[x] (g and w) that I would like to be able to manipulate because I want to look at this time evolution for as many different parameter sets as possible. But I cannot compute the general Integral k[x] without specifying g and w in advance because the NIntegrate option gives me errors for the unspecified parameters. I plotted the whole thing for the parameters {g,w,d}={1,1,1/2}) but I don’t want to manually change all the parameters in all the calculations every time.

I need to plot this situation for many different Parameter sets of g,w and d so I thought about using a program where I only need to specify my 3 parameters in advance and all the steps necessary to get to the plot were taken without me having to manually change the parameters all the time. Am I right in the assumption that the Manipulate option can do this?

It does not necessarily have to be Manipulate, if there is an Option like specifying a table of sets of parameters and the plot is then made for all of them I would be happy too.

---

<div class="post-metadata">

**Author:** ![hansmilton](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/hansmilton/32/8656_2.png) [@hansmilton](https://community.wolfram.com/u/hansmilton)\
**Post date:** [June 24, 2021, 12:09pm UTC](https://community.wolfram.com/t/plotting-graphs-with-manipulate-empty-plots/18329/4 "2021-06-24T12:09:26Z")

</div>

The controls in a `Manipulate` are localized. Changing the value of the controls for `g`, `w` or `d` updates only the references to `g`, `w` or `d` that explicitly appears in the first argument to `Manipulate`. No other updates are done.

An example that works, a `Manipulate` plotting your function `n`:

```
n[x_, g_, w_, d_] := Sqrt[-1/8 (-1 + Sqrt[1 - d^2]) (2 g^2 + w^2 - w^2 Cos[2 g * x])]

Manipulate[
 	Plot[n[t, g, w, d], {t, 0, 10}],
 	{{g, 1}, 0, 20, Appearance -> "Labeled"},
 	{{w, 1}, 0, 2 Pi, Appearance -> "Labeled"},
 	{{d, 0.5}, 0, 1, Appearance -> "Labeled"}
 ]

```

---

<div class="post-metadata">

**Author:** ![henrieluiskueppers](https://avatars.discourse-cdn.com/v4/letter/h/7ba0ec/32.png) [@henrieluiskueppers](https://community.wolfram.com/u/henrieluiskueppers)\
**Post date:** [June 26, 2021, 9:41am UTC](https://community.wolfram.com/t/plotting-graphs-with-manipulate-empty-plots/18329/5 "2021-06-26T09:41:33Z")

</div>

I somehow got it to work. I send you my code so If anyone is interested you can just look at what I did.

[Open in Wolfram Cloud ↗](https://www.wolframcloud.com/obj/8d2d5812-e7d0-4ec7-a224-d65ab3c53f85)
