将两个图放入一个操作中,同时保持图可见

发布于 2024-12-09 03:43:12 字数 407 浏览 2 评论 0原文

我想查看一些依赖于参数 n 的函数的实部和虚部。单独地(设置 n 值),我得到了非常好的图表,但是当将它们放入 Manipulate 中时,它们变得非常小。

这是我正在使用的确切代码;删除操作后,图表会以良好的尺寸显示,但使用后,它们太小而难以辨认。

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}]

为什么会这样,我该如何解决它?

I want 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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

终遇你 2024-12-16 03:43:12
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}]

在此处输入图像描述

编辑

请记住,您还可以执行以下操作:

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]
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}]

enter image description here

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]
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文