Message Boards Message Boards

[✓]Avoid warning message when using Grapics3D command with embedded Insert?

GROUPS:

Hi,

When using the Graphics3D command with an embedded Insert option, I receive the following warning message.

"Coordinate {0, 0.2, 0} should be a pair of numbers, or a Scaled or Offset form."

The graphics command gives the desired output, but I don't like the warning message and would like to know what I am doing incorrectly - see attached.

Thanks so much,

Mitch Sandlin

Attachments:
POSTED BY: Mitchell Sandlin
Answer
8 days ago

Your expression (the coordinates) that you want inset is effectively a 2D graphic. Thus, the 'opos' input (3rd argument to inset) should be a 2D point. The 'pos' is a 3D point. So one possible change to you code is this:

list={{0,0,0},{1,1,1},{0,0,2}};
Graphics3D[{{PointSize[Large],Point[list]},Inset[#,#+{0,0.2,0},Most[#]]&/@list},Axes -> True,AxesLabel-> {"x","y","z"}]

But it probably makes more sense to not even specify the 'opos'.

Graphics3D[{{PointSize[Large],Point[list]},Inset[list[[2]],list[[2]]+{0,0.2,0}] },Axes -> True,AxesLabel-> {"x","y","z"}]
POSTED BY: Chad Knutson
Answer
8 days ago

Group Abstract Group Abstract