Group Abstract Group Abstract

Message Boards Message Boards

0
|
10K Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Add a point to a 3D graph with a label?

Posted 5 years ago

I am trying to add a point on a 3D surface plot, and add a label without a line and a background. My code is as follows:

fig1 = Plot3D[Log[a] + Log[b], {a, 1, 10}, {b, 1, 10}];
fig2 = ListPointPlot3D[{{5, 5, Log[5] + Log[5]}} -> {"X"}]; 
Show[fig1, fig2]

Questions:

(1) Only half of the dot is showing above the surface plot. How can I have the entire dot appear? Should I simply add a small amount to the z-coordinate?

(2) How can I get rid of the line connecting the dot and the label?

(3) How can I get rid of the background of the label (make background transparent)?

Any help will be greatly appreciated.

Sincerely,

Cuneyt

POSTED BY: Cuneyt Eroglu
4 Replies
Posted 5 years ago

This makes perfect sense! Thank you, Rohit!

POSTED BY: Cuneyt Eroglu
Posted 5 years ago

Yes, there is a way, but it is counterintuitive, change 5, 5 to 5, -5.

f2 = Graphics3D[{Black, PointSize[0.02], 
         Point[{5, -5, Log[5] + Log[5] + .1}], 
         Text[Style["X", 12], {5, -5, Log[5] + Log[5] + .6}]}, Axes -> True]

enter image description here

POSTED BY: Rohit Namjoshi
Posted 5 years ago

Hi Rohit, Thanks for your reply. When I Graphics3D I cannot combine fig1 and fig2 because fig1 has a reverse axis. I use ScalingFunctions -> {None, "Reverse"} in fig1. So, the following code places X outside the surface plot.

fig1 = Plot3D[Log[a] + Log[b], {a, 1, 10}, {b, 1, 10}, 
  ScalingFunctions -> {None, "Reverse"}]; f2 = 
 Graphics3D[{Black, PointSize[0.02], 
   Point[{5, 5, Log[5] + Log[5] + .1}], 
   Text[Style["X", 12], {5, 5, Log[5] + Log[5] + .6}]}];
Show[fig1, f2]

Is there a way to make Graphics3D work with a reverse axis or is there a way to modify labels in ListPointPlot3D? Thank you so much in advance. Cuneyt

POSTED BY: Cuneyt Eroglu
Posted 5 years ago
POSTED BY: Rohit Namjoshi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard