0
$\begingroup$

I want to use mma to draw this picture: original picture.

Here is my code:

Show[Graphics3D[{Opacity[0.5], LightBlue, InfinitePlane[{0, 0, 0}, {{0, 0, 1}, {1, 0, 0}}]}, Axes -> True], 
 Plot3D[Labeled[x^2 + y^2, "surface z=f(x,y)"], {x, -1, 1}, {y, -1, 1}, PlotStyle -> Directive[Gray, Opacity[0.4]], Mesh -> None ], 
 ParametricPlot3D[{x, 0, x^2}, {x, -1, 1}] , 
 ParametricPlot3D[Labeled[{x, 0, 0}, "tangent line, slope  \!\(\*SubscriptBox[\(f\), \\(x\)]\)(\!\(\*SubscriptBox[\(x\), \(0\)]\),\!\(\*SubscriptBox[\(y\), \\(0\)]\))"], {x, -1, 1}, PlotStyle -> {Black}], 
 ParametricPlot3D[{x, 0, -1.5}, {x, -1, 1}, PlotStyle -> {LightBlue, Opacity[1]}], AxesLabel -> {x, y, z}, 
 BoxRatios -> {1, 2, 1}, Boxed -> False, Axes -> False]

And here is the result: my result

As you can see, the biggest differences between them are the guide lines. In original picture, there are guide lines connecting the graph and the label. I've searched "guide line" and "inspector" in documentation, but both get no results. How can I draw these lines in mma?

New contributor
Piko Mone is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.
$\endgroup$
8
$\begingroup$

You could use "Callout" instead of "Labeled". Here is an example:

Show[
 Graphics3D[{Opacity[0.5], LightBlue, 
   InfinitePlane[{0, 0, 0}, {{0, 0, 1}, {1, 0, 0}}]}, Axes -> True],
 Plot3D[Callout[x^2 + y^2, "surface z=f(x,y)", Above], {x, -1, 
   1}, {y, -1, 1}, PlotStyle -> Directive[Gray, Opacity[0.4]], 
  Mesh -> None], 
 ParametricPlot3D[Callout[{x, 0, x^2}, "{x,0,x^2}"], {x, -1, 1}], 
 ParametricPlot3D[
  Callout[{x, 0, 0}, 
   "tangent line, slope  \!\(\*SubscriptBox[\(f\), \(x\)]\), \
\!\(\*SubscriptBox[\(x\), \(0\)]\)", LeaderSize -> 10, 
   Appearance -> "Frame", CalloutMarker -> "Arrow"], {x, -1, 1}, 
  PlotStyle -> {Black}], 
 ParametricPlot3D[{x, 0, -1.5}, {x, -1, 1}, 
  PlotStyle -> {LightBlue, Opacity[1]}], AxesLabel -> {x, y, z}, 
 BoxRatios -> {1, 2, 1}, Boxed -> False, Axes -> False]

enter image description here

$\endgroup$

Your Answer

Piko Mone is a new contributor. Be nice, and check out our Code of Conduct.

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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