Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

When using the following manipulate I can rotate the plot and manipulate the value without my view point changing;

Manipulate[Plot3D[Sin[a*x + y^2], {x, -3, 3}, {y, -2, 2}], {a, 1, 5}]

If I rotate one of these plot in the following manipulate the value the view point changes back to the default.

Manipulate[GraphicsRow
[{Plot3D[Sin[a*x + y^2], {x, -3, 3}, {y, -2, 2}],
Plot3D[Sin[a*x + y^2], {x, -3, 3}, {y, -2, 2}]}], 
{a, 1, 5}]

I have a much more complex plot that contains a GraphgicsRow and a Column and I want it to keep the view point of the plot while I manipulate it. Is there a simple way to do this? Is the problem the GraphicsRow or is that just a coincidence?

Thanks.

share|improve this question
    
I have a strange feeling this question is a duplicate. Does anyone recall? Edit: I'm probably thinking of stackoverflow.com/q/8642182/618728 –  Mr.Wizard Feb 22 '13 at 1:08
add comment

1 Answer 1

up vote 7 down vote accepted

GraphicsRow is convenient to use, for example, when you would like to control the total width of many graphics or image objects with a single setting - because GraphicsRow takes ImageSize option. But there is no real reason to use it. Use Row instead and control size of graphics individually for each plot:

Manipulate[Row[{
   Plot3D[Sin[a*x + y^2], {x, -3, 3}, {y, -2, 2}, ImageSize -> 300],
   Plot3D[Sin[a*x + y^2], {x, -3, 3}, {y, -2, 2}, ImageSize -> 300]}], {a, 1, 5}]

If you must use GraphicsRow or just curious how to make it work, here is a way - separate with Dynamicthe options of internal Plot3Ds so they do not reset each other. This maybe way to complicated and an overkill - but at least it is interesting:

Manipulate[GraphicsRow[{
   Graphics3D[Dynamic@Plot3D[Sin[a x + y^2], {x, -3, 3}, {y, -2, 2}, 
       Boxed -> False, Axes -> False][[1]]],
   Graphics3D[Dynamic@Plot3D[Sin[a x + y^2], {x, -3, 3}, {y, -2, 2}, 
       Boxed -> False, Axes -> False][[1]]]}], {a, 1, 5}]

You need Graphics3D because it can take Dynamic inside, but Plot3D cannot.

share|improve this answer
    
Thanks Vitaliy. It works when I replace the GraphicsRow with a Row. –  Cam Feb 22 '13 at 2:01
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.