Azzera filtri
Azzera filtri

circle in pcolor map with radius as half of map length

2 visualizzazioni (ultimi 30 giorni)
Hello, I want to plot pcolor
pcolor(X)
X=50 * 50 matrix
I wish to plot a circle within pcolor map; with centre as centre of circle; and radius as half of pcolor map.
I hope I am clear. Please help.
  5 Commenti
Star Strider
Star Strider il 8 Apr 2019
I am not certain what result you want.
If you define your pcolor plot in terms of a radius and an angle (rather than x and y), you can then use the pol2cart function to create a circle plot from it. For an example, see Applying shading radially outwards on a circle (link).
Bhowmik.U
Bhowmik.U il 9 Apr 2019
I am enclosing the diagrammatic representation of my querry....I wish to eliminate the gray part from pcolor plot.

Accedi per commentare.

Risposte (1)

Walter Roberson
Walter Roberson il 9 Apr 2019
Modificato: Walter Roberson il 9 Apr 2019
temp = -24.5:1:24.5;
mask = temp.^2 .' + temp.^2 > 24.5.^2;
Xt = X;
Xt(mask) = nan;
pcolor(Xt);

Categorie

Scopri di più su Geographic Plots 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