开发者

Putting two plots in a manipulate whilst keeping the plots visible

开发者 https://www.devze.com 2023-04-12 01:07 出处:网络
I w开发者_如何学Cant to look at both the real and imaginary parts of some functions that depend on a parameter n. Individually (with set values of n), I get perfectly nice graphs, but when putting the

I w开发者_如何学Cant to look at both the real and imaginary parts of some functions that depend on a parameter n. Individually (with set values of n), I get perfectly nice graphs, but when putting them in a Manipulate they become very small.

Here is the exact code I'm using; remove the manipulate and the graphs display at a good size, but with it they are too small to be legible.

Manipulate[
 Plot3D[Im[Sqrt[-1 + (x + I y)^2 n]], {x, -2, 2}, {y, -1, 1}, 
   AxesLabel -> Automatic]
  Plot3D[Re[Sqrt[-1 + (x + I y)^2 n]], {x, -2, 2}, {y, -2, 2}, 
   AxesLabel -> Automatic]
 , {n, 1, 10, 1}]

Why is it doing this, and how can I fix it?


Manipulate[
 Row[{
   Plot3D[Im[Sqrt[-1 + (x + I y)^2 n]], {x, -2, 2}, {y, -1, 1}, 
          AxesLabel -> Automatic, ImageSize -> 300] , 
   Plot3D[Re[Sqrt[-1 + (x + I y)^2 n]], {x, -2, 2}, {y, -2, 2}, 
          AxesLabel -> Automatic, ImageSize -> 300]}], 
{n, 1, 10, 1}]

Putting two plots in a manipulate whilst keeping the plots visible

Edit

Remember that you may also do something like:

a = Sequence @@{{x, -2, 2}, {y, -1, 1}, AxesLabel-> Automatic, ImageSize-> 200};
Manipulate[
 Row[{
   Plot3D[Im[Sqrt[-1 + (x + I y)^2 n]], Evaluate@a],
   Plot3D[Re[Sqrt[-1 + (x + I y)^2 n]], Evaluate@a]}],
 {n, 1, 10, 1}, 
 PreserveImageOptions -> False]
0

精彩评论

暂无评论...
验证码 换一张
取 消