How to plot only specific contours in matlab?
36 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello,
I would like to ask about contours plot in matlab. I would like to plot only specific contours of all my data. I have values ranrging from 10 to 10000. I would like to plot only the contousr with va;lues : 10, 100, 500, 1000 and 100000.
I am using these commands
t=importdata('input.txt');
x=t(:,1);
y=t(:,2);
z=t(:,5);
[xi, yi] = meshgrid(...
linspace(min(x),max(x)),...
linspace(min(y),max(y)));
zi = griddata(x,y,z, xi,yi,'natural');
figure(1)
contourf(xi,yi,zi,15,'LineStyle','none')
set(gca,'ColorScale','log')
colormap(flipud(hot(50)))
Could you please help me?
0 Commenti
Risposta accettata
dpb
il 7 Lug 2022
The third option down says
contourf(___,levels) specifies the contour lines to display as the last argument in any of the previous syntaxes. ... To draw the contour lines at specific heights, specify levels as a vector of monotonically increasing values. ...
Emphasis added, n levels and one level only options elided for brevity -- dpb
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Contour 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!