Question: This is my code.

```
myPlot[a_, b_] := ParametricPlot3D[Sin[x], {x, a, b}];

Manipulate[Show[myPlot[a, b]], {a, -1, 1}, {b, -1, 1}]

```

I want to manipulate `a,b`, so that the entire plot will change as we change `a,b`. 
However there are errors. Do you know how to fix it ? Thanks

Answer: 
```
myPlot[a_, b_] := ParametricPlot3D[{1, x, Sin[x]}, {x, a, b}];

Manipulate[Show[myPlot[a, b]], {{a, -1}, -1, Pi}, {{b, 1}, -1, Pi}]

```

![Mathematica graphics](https://i.stack.imgur.com/3TKqq.png)
The errors occur whenever `a==b` since the domain of the plot is just a point which is not allowed. Consequently, you must handle `a==b` as a special case. It also helps to fix the `PlotRange`.

```
myPlot[a_, b_] := ParametricPlot3D[
   {1, x, Sin[x]}, {x, a, b},
   PlotRange -> {{0, 2}, {-1, Pi}, {-1, 1}}];

Manipulate[
 Piecewise[{
   {Graphics3D[
     Point[{1, a, Sin[a]}],
     Axes -> True,
     PlotRange -> {{0, 2}, {-1, Pi}, {-1, 1}}],
    a == b}},
  myPlot[a, b]],
 {{a, -1}, -1, Pi, Appearance -> "Labeled"},
 {{b, 1}, -1, Pi, Appearance -> "Labeled"}]

```

![enter image description here](https://i.stack.imgur.com/wdlwy.png)