4

I want to place a caption at the bottom of a Plot3D graphic that doesn't move as I rotate the plot with the mouse. I have tried two approaches, neither of which is satisfactory.

My first approach is to position Graphics3D@Text under the 3D plot. This method forces in the caption's position to move relative to the 3D plot. Here is my stripped down code for this attempt:

Show[
 Plot3D[(y^2 - x^2 - 1/6 x^3), {x, -8, 5}, {y, -6, 6}, 
 MeshFunctions -> {#3 &}, Mesh -> 60, PlotPoints -> 50],

 Graphics3D@Text[Style["Caption goes here", 14,
 Black, FontFamily -> "Helv"], {9, -10, -10}]
]

My second approach is to use PlotLabel in Plot3D. Although the label remains relatively fixed in position, it appears at the top of the 3D plot and I want it to appear at the bottom of the 3D plot. Here is my stripped down code for this attempt:

Plot3D[(y^2 - x^2 - 1/6 x^3), {x, -8, 5}, {y, -6, 6}, 
 MeshFunctions -> {#3 &}, Mesh -> 60, PlotPoints -> 50,
 PlotLabel -> Style["Caption goes here", 14, FontFamily -> "Helv"]]

Any suggestions?

Stephen
  • 1,156
  • 5
  • 12

1 Answers1

5

Update

From the comments what I believe you want is the rotating window not to resize as you rotate. This happens because the default RotatingAction is "Fit". You need it to be "Clip".

Labeled[
 Plot3D[(y^2 - x^2 - 1/6 x^3), {x, -8, 5}, {y, -6, 6}, 
  MeshFunctions -> {#3 &}, Mesh -> 60, PlotPoints -> 50,
  RotationAction -> "Clip"],
 Style["Caption goes here", 14, FontFamily -> "Helv"],
 Bottom]

Now the window is not resized and the label does not jump around.

Original Post

You may use Inset in the Epilog option.

Plot3D[(y^2 - x^2 - 1/6 x^3), {x, -8, 5}, {y, -6, 6}, 
 MeshFunctions -> {#3 &}, Mesh -> 60, PlotPoints -> 50,
 Epilog -> {Inset[Style["Caption goes here", 14, Black, FontFamily -> "Helv"], 
    {Center, Bottom}, {Center, Bottom}]}
]

enter image description here

Hope this helps.

Edmund
  • 42,267
  • 3
  • 51
  • 143