Hia

I drew a contour or a plot. Now, I would like to move that contour or the plot to the given point 'M' in a figure. How can I do so?

for contour, as an example in 2d case, i would like to move it in a way that the upper right vertex coincide the point.

Cheers

Tohid

"Tohid"

one of the solutions is outlined below

- it shows you how to move the contour patches

- it is left up to you to determine the shift-factor

sf=[1,1]; % <- x/y shift factor...

[ch,ch]=contour(peaks(256),[-4:.5:4]);

set(gca,'xlim',[0,512],'ylim',[0,512]);

cch=get(ch,'children');

xd=get(cch,'xdata');

yd=get(cch,'ydata');

for j=1:256

nxd=cellfun(@(x) x+j*sf(1),xd,'uni',false);

nyd=cellfun(@(x) x+j*sf(2),yd,'uni',false);

set(cch,{'xdata'},nxd,{'ydata'},nyd);

pause(.05);

end

us

one of the solutions is outlined below

- it shows you how to move the contour patches

- it is left up to you to determine the shift-factor

sf=[1,1]; % <- x/y shift factor...

[ch,ch]=contour(peaks(256),[-4:.5:4]);

set(gca,'xlim',[0,512],'ylim',[0,512]);

cch=get(ch,'children');

xd=get(cch,'xdata');

yd=get(cch,'ydata');

for j=1:256

nxd=cellfun(@(x) x+j*sf(1),xd,'uni',false);

nyd=cellfun(@(x) x+j*sf(2),yd,'uni',false);

set(cch,{'xdata'},nxd,{'ydata'},nyd);

pause(.05);

end

us

Realy thanks us.

it was realy helpful.

can I have one mor question please?

if I want to shrink this contour you mentioned, what should I do?

I know in 2d case I can use the following matrix

[cos(t) sin(t); sin(t) cos(t)]; (where t is the degree of preference for shrinking)

to do the shrinking for a given vector but i dont know what to do for a plot or contour.

I will be glad if u can help me please

Tohid

it was realy helpful.

can I have one mor question please?

if I want to shrink this contour you mentioned, what should I do?

I know in 2d case I can use the following matrix

[cos(t) sin(t); sin(t) cos(t)]; (where t is the degree of preference for shrinking)

to do the shrinking for a given vector but i dont know what to do for a plot or contour.

I will be glad if u can help me please

Tohid

1. Plotting 3D points on 2D-contour plots with colors indicating z values

3. Contour Plot / Plot Range / Contour Scaling

4. Plot contour plots on 2D planes of 3D plot

5. POLAR_CONTOUR plot giving strange values for contour lines

6. How to plot a given contour in the image?

7. Scatter plot - making a contour map of point concentration

8. 3D contour plot using data point

9. Fwd: Extracting points from a contour plot

10. plotting contour from a custom list of points

11. How to plot contour of scatter points

12. Extracting points from a contour plot

13. Can I plot a single point with my Contour Lines?

14. display peak point/value in contour plot

15. Combining Contour plots with discrete points

3 post • Page:**1** of **1**