Message Boards Message Boards

How to create enter image in array systematically ?

Posted 10 years ago

Actually in my program I am generating image in each iteration of loop, and then I want to get all those images on the same graph. Suggest a way to do so. One solution which come to my mind is to store each image in an array and then plot all of them at once by using ShowAll or something similar. Please suggest me with array or some other solution. Thank you in advance.

My current code :-

    For[
         W = 1.0, W < 1.5, W = W + 0.1;
         A = 2 (W - 1)^0.5; S
         Print["W=" [W]];
         Print[ContourPlot[
         1/(1 - y^2)^0.5 + w^2/2 == W, {w, -A, A}, {y, -1, 1}]];
       ]
POSTED BY: Chandan Bagdia
2 Replies
Posted 10 years ago

Dear W. Craig Carter.

Thanks a lot it worked.

I will take care to use "<>" code editing in post so that it is convenient.

POSTED BY: Chandan Bagdia

Chandan, It is helpful if you use the "<>" code-editing in your posts.

This may be helpful.

Create a list of plots

plots = Table[
  With[{aParam = 2 Sqrt[(wParam - 1)]},
   ContourPlot[
    1/(1 - y^2)^0.5 + w^2/2 == wParam, {w, -aParam, aParam}, {y, -1, 
     1}]],
  {wParam, 1.0001, 1.5, .1}
  ]

Show all of the plots together:

   Show[plots, PlotRange -> All]

Note, W=1 gives a plot range of {0,0}....

POSTED BY: W. Craig Carter
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract