|
On Feb 2, 1:13 am, "matthias " <matthia...@hotmail.com> wrote:
> Hello all,
>
> I would like to add a logo on a plot.
> I don't want it to move away when I zoom or pan, so I put it into a dedicated axes object that will stand still.
> I want that axes object to stick to the top-right corner of my plot so I set it's position property, based on the plot axes position, with something like that:
> p1 = get(hAxes1,'position');
> set(hAxes2,'position',[p1(1)+p1(3)-width p1(2)+p1(4)-height width height]);
>
> After that I hope the top-right corners of the plot boxes will be exactly superimposed.
>
> But they are not: the plot axes (hAxes1) has been set with "axis equal", so its position property does not reflect the actual position of its plot box.
>
> Do anyone know how I still can get the "real" position of that plot box without abandoning the "axis equal" setting ?
>
> Thanks a lot in advance.
>
> matthias
I think you're getting things mixed up.
Setting axes equal has no effect on the position property of gca.
Try this:
clf
get(gca,'Position')
set(gca,...
'DataAspectRatio',[1 1 1])
get(gca,'Position')
But maybe you're doing something different?
|