From: Zhen on
Hi,

I have drawn a 3D rectangle using the "patch" function and I want to place it at a certain location in my 3D plot (i.e., instead of the rectangle starting at the origin, I want it to start at xyz coordinate: 6000,0,0). What is the best way to do this?
From: Walter Roberson on
Zhen wrote:

> I have drawn a 3D rectangle using the "patch" function and I want to
> place it at a certain location in my 3D plot (i.e., instead of the
> rectangle starting at the origin, I want it to start at xyz coordinate:
> 6000,0,0). What is the best way to do this?

set(PatchHandle, 'XData', 6000 + get(PatchHandle,'XData'))

Alternately

T = hgtransform('Matrix', makehgtform('translate', [6000 0 0]));
set(PatchHandle, 'Parent', T);