# add an ellipse line into pcolor plot

9 visualizzazioni (ultimi 30 giorni)
Juraj il 16 Gen 2014
Risposto: Juraj il 16 Gen 2014
Hello,
I have a pcolor plot which has some symmetry and I want to emphasize it by adding an ellipse to the figure (just the line) - normally I would do it like this:
t=0:0.1:2*pi;
a=26;
b=25;
x=a*cos(t);
y=b*sin(t);
plot(x,y,'--')
Now I want to add it to the existing pcolor plot. How can this be achieved? I saw some similar problems here, but wasn't able to use it to solve my problem. Thanks in advance.
##### 0 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti

Accedi per commentare.

### Risposta accettata

Juraj il 16 Gen 2014
Nevermind, I managed to do it somehow. If anyone would be in need of something similar, here's my code:
figure
pcolor(x,y,Z);shading interp; colormap jet;axis square off
h_ax = gca;
h_ax_line = axes('position', get(h_ax, 'position'));
plot(X,Y,'g--');
set(h_ax_line, 'YAxisLocation', 'right', 'xlim', get(h_ax, 'xlim'),'ylim', get(h_ax, 'ylim'), 'color', 'none');
axis square off
Regards, Juraj
##### 0 CommentiMostra -2 commenti meno recentiNascondi -2 commenti meno recenti

Accedi per commentare.

### Categorie

Scopri di più su Axis Labels in Help Center e File Exchange

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by