Skip to main content
Tweeted twitter.com/StackMma/status/813194820831379456
solution tested and codes updated
Source Link
Liang.X
  • 113
  • 7

Background

I am trying to create a three-graphics plot using the command GraphicsGrid[] to show the decomposition of the phase plane portrait; unfortunately, the plot created is very ugly since the axes of each graph are not aligned with each other; besides, the corresponding step size of the axes are not identical.

Sources

The differential equation of the dynamic system is given below:

f1 = {y''[t] == -9.82 Sin[y[t]] + 1.5 (y[t] - y'[t]), y[0] == 1, y'[0] == 0}; ss[t_] = NDSolve[f1, y, {t, 0, 10}] 

Questions

  1. How to create a multi-graphics plot with axes aligned well automatically?
  2. How to make sure the step sizes of the axes are consistent with the corresponding axes of different graphics?

enter image description here

Updates

I have tried the solution (specifing the PlotRange and ImageSize of the graphic) offered by @Sumit, which works well in certain situation; however, the questions aforementioned still remain, shown as following: enter image description here

the associated codes are given as:

(*differenital equation:*) f1 = {y''[t] == -9.82 Sin[y[t]] + 1.5 (y[t] - y'[t]), y[0] == 1, y'[0] == 0}; ss[t_] = NDSolve[f1, y, {t, 0, 10}]; (*Graph 1: yy*) yyt = Plot[y[t] /. ss[t], {t, 0, 10}, PlotRange -> {{0, 10}, {-0.5, 1.5}}, ImageSize -> {360, 226}, AxesLabel -> {"t", "\[Theta]"}]; yy = Rotate[yyt, -0.5 \[Pi]]; (*Graph 2: Dy*) Dy = Plot[y'[t] /. ss[t], {t, 0, 10}, PlotRange -> {{0, 10}, {-2, 1}}, ImageSize -> {360, 245}, AxesLabel -> {"t", "\!\(\*FractionBox[\(d\[Theta]\), \(dt\)]\)"}]; (*Graph 3: yyDy--the phase plane portrait*) yyDy = ParametricPlot[{y[t], y'[t]} /. ss[t], {t, 0, 10}, PlotRange -> {{-0.5, 1.5}, {-2, 1}}, ImageSize -> {226, 245}, AxesLabel -> {"\[Theta]", "\!\(\*FractionBox[\(d\[Theta]\), \(dt\)]\)"}]; (*Create the multi-graphics plot*) Grid[{{yyDy, Dy}, {yy}}] 

Background

I am trying to create a three-graphics plot using the command GraphicsGrid[] to show the decomposition of the phase plane portrait; unfortunately, the plot created is very ugly since the axes of each graph are not aligned with each other; besides, the corresponding step size of the axes are not identical.

Sources

The differential equation of the dynamic system is given below:

f1 = {y''[t] == -9.82 Sin[y[t]] + 1.5 (y[t] - y'[t]), y[0] == 1, y'[0] == 0}; ss[t_] = NDSolve[f1, y, {t, 0, 10}] 

Questions

  1. How to create a multi-graphics plot with axes aligned well automatically?
  2. How to make sure the step sizes of the axes are consistent with the corresponding axes of different graphics?

enter image description here

Background

I am trying to create a three-graphics plot using the command GraphicsGrid[] to show the decomposition of the phase plane portrait; unfortunately, the plot created is very ugly since the axes of each graph are not aligned with each other; besides, the corresponding step size of the axes are not identical.

Sources

The differential equation of the dynamic system is given below:

f1 = {y''[t] == -9.82 Sin[y[t]] + 1.5 (y[t] - y'[t]), y[0] == 1, y'[0] == 0}; ss[t_] = NDSolve[f1, y, {t, 0, 10}] 

Questions

  1. How to create a multi-graphics plot with axes aligned well automatically?
  2. How to make sure the step sizes of the axes are consistent with the corresponding axes of different graphics?

enter image description here

Updates

I have tried the solution (specifing the PlotRange and ImageSize of the graphic) offered by @Sumit, which works well in certain situation; however, the questions aforementioned still remain, shown as following: enter image description here

the associated codes are given as:

(*differenital equation:*) f1 = {y''[t] == -9.82 Sin[y[t]] + 1.5 (y[t] - y'[t]), y[0] == 1, y'[0] == 0}; ss[t_] = NDSolve[f1, y, {t, 0, 10}]; (*Graph 1: yy*) yyt = Plot[y[t] /. ss[t], {t, 0, 10}, PlotRange -> {{0, 10}, {-0.5, 1.5}}, ImageSize -> {360, 226}, AxesLabel -> {"t", "\[Theta]"}]; yy = Rotate[yyt, -0.5 \[Pi]]; (*Graph 2: Dy*) Dy = Plot[y'[t] /. ss[t], {t, 0, 10}, PlotRange -> {{0, 10}, {-2, 1}}, ImageSize -> {360, 245}, AxesLabel -> {"t", "\!\(\*FractionBox[\(d\[Theta]\), \(dt\)]\)"}]; (*Graph 3: yyDy--the phase plane portrait*) yyDy = ParametricPlot[{y[t], y'[t]} /. ss[t], {t, 0, 10}, PlotRange -> {{-0.5, 1.5}, {-2, 1}}, ImageSize -> {226, 245}, AxesLabel -> {"\[Theta]", "\!\(\*FractionBox[\(d\[Theta]\), \(dt\)]\)"}]; (*Create the multi-graphics plot*) Grid[{{yyDy, Dy}, {yy}}] 
edited tags
Link
xzczd
  • 71.6k
  • 10
  • 184
  • 524
deleted 51 characters in body
Source Link
corey979
  • 24.4k
  • 7
  • 61
  • 110

[Background]:Background

I am trying to create a three-graphics plot using the command < GraphicsGrid[] >GraphicsGrid[] to show the decomposition of the phase plane portrait; unfortunately, the plot created is very ugly since the axes of each graph are not aligned with each other; besides, the corresponding step size of the axes are not identical.

[Sources]:Sources

the differential equation of the dynamic system is given below:

f1 = {y''[t] == -9.82 Sin[y[t]] + 1.5 (y[t] - y'[t]), y[0] == 1, y'[0] == 0};The differential equation of the dynamic system is given below:

ss[t_] = NDSolve[f1, y, {t, 0, 10}]

f1 = {y''[t] == -9.82 Sin[y[t]] + 1.5 (y[t] - y'[t]), y[0] == 1, y'[0] == 0}; ss[t_] = NDSolve[f1, y, {t, 0, 10}] 

[Questions]:Questions

  1. How to create a multi-graphics plot with axes aligned well automatically?
  2. How to make sure the step sizes of the axes are consistent with the corresponding axes of different graphics?

Thanks very much for any help~

enter image description here

[Background]:

I am trying to create a three-graphics plot using the command < GraphicsGrid[] > to show the decomposition of the phase plane portrait; unfortunately, the plot created is very ugly since the axes of each graph are not aligned with each other; besides, the corresponding step size of the axes are not identical.

[Sources]:

the differential equation of the dynamic system is given below:

f1 = {y''[t] == -9.82 Sin[y[t]] + 1.5 (y[t] - y'[t]), y[0] == 1, y'[0] == 0};

ss[t_] = NDSolve[f1, y, {t, 0, 10}]

[Questions]:

  1. How to create a multi-graphics plot with axes aligned well automatically?
  2. How to make sure the step sizes of the axes are consistent with the corresponding axes of different graphics?

Thanks very much for any help~

enter image description here

Background

I am trying to create a three-graphics plot using the command GraphicsGrid[] to show the decomposition of the phase plane portrait; unfortunately, the plot created is very ugly since the axes of each graph are not aligned with each other; besides, the corresponding step size of the axes are not identical.

Sources

The differential equation of the dynamic system is given below:

f1 = {y''[t] == -9.82 Sin[y[t]] + 1.5 (y[t] - y'[t]), y[0] == 1, y'[0] == 0}; ss[t_] = NDSolve[f1, y, {t, 0, 10}] 

Questions

  1. How to create a multi-graphics plot with axes aligned well automatically?
  2. How to make sure the step sizes of the axes are consistent with the corresponding axes of different graphics?

enter image description here

Source Link
Liang.X
  • 113
  • 7
Loading