# How do I stop resizing in Plot3D upon mouse click?

This has always bugged me and wondering if there is a fix.

When I evaluate a Plot3D I get a graph as expected. However, when I click the graph with the mouse it resizes to a smaller size. I can then rotate it freely. I find this behavior strange. I illustrated this in the gif below.

In addition, notice that if I evaluate Plot3D again, the image doesn't reset to the big size. I find this strange as well. Shouldn't it resize to big? I illustrated this toward the end of the gif.

1. Can you explain why the image resizes to small upon clicking it with the mouse? What's the point of this?

2. Can you explain why the image does not resize to large upon evaluating Plot3D the second time as shown in the gif? This doesn't make sense why it wouldn't reset like everything else.

3. Is there a way to evaluate Plot3D in such a way that I get a fixed size graph that does not change when it is initially clicked by the mouse?

Thank you! I'm relatively new to Stack Exchange. Please let me know if there is anything I am doing that is not following protocol. Thank you!

[![enter image description here][3]][3]

• I'm on a mobile right now, so I can't test... But does specifying an ImageSize solve the issue? It's an option for Plot and the like – Lukas Sep 20 '15 at 20:14
• Thanks Lukas. I tried that but didn't help. However, I noticed that if I added the option SphericalRegion->True I almost get what I want. See 2nd gif above. You'll notice it still moved the graph ever so slightly to the left when initially clicked. I would like no change at all. – Michael McCain Sep 20 '15 at 20:21
• So I did so more digging and may have answered my own question. If I add ImagePadding->1 and SphericalRegion->True for options it seems to work. It there a more efficient way? It seems like aesthetically the default option should be no resizing or shifting. – Michael McCain Sep 20 '15 at 20:33
• Have you tried the option RotationAction->"Clip"? I think this option without the others about would do it. – Edmund Sep 20 '15 at 20:52
• Hi Edmund. Interesting. The RotationAction->Clip option fixes the initial resize action but the moment you try rotating the graphic the size jumps to a smaller size again. It looks like my solution above still stands. Any other ideas? – Michael McCain Sep 20 '15 at 20:56

Plot3D[Sin[x y], {x, -3, 3}, {y, -3, 3}, RotationAction -> "Clip", SphericalRegion -> True]

• @MichaelMcCain. Well, maybe I overstated with "works as desired." No resizing but there is the small shift to the left as you describe (again with Windows 7 and Mathematica 10.2 - so probably not an OS X issue). Adding in ImagePadding -> 1 does complete things as you suggested. – JimB Sep 20 '15 at 22:42