Adjust contour interpolation in plot
15 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hello!
Is it possible to adjust the interpolation of a contour plot? The issue I am having is that there are strange connections between points, indicated by the arrow in the image below, that I feel "should not be" the case. Though perhaps that conclusion is incorrect?
I have attached the data, included the script, and inserted the output image here.
Thank you for any help!
%CREATEFIGURE(X, Y1, Z, X1)
% X: contour x
% Y: contour y
% Z: contour z
% X1: vector of x data
% Create figure
figure1 = figure('Colormap',...
[1.0000 1.0000 1.0000;
0.9800 0.9800 1.0000
0.9167 0.9167 1.0000
0.8533 0.8533 1.0000
0.7900 0.7900 1.0000
0.7267 0.7267 1.0000
0.6633 0.6633 1.0000
0.6000 0.6000 1.0000
0.4812 0.5617 0.9766
0.4711 0.5665 0.9795
0.4609 0.5713 0.9825
0.4507 0.5761 0.9854
0.4406 0.5809 0.9883
0.4305 0.5856 0.9912
0.4203 0.5904 0.9941
0.4101 0.5952 0.9971
0.4000 0.6000 1.0000
0.3466 0.5867 0.9719
0.2931 0.5733 0.9437
0.2397 0.5600 0.9156
0.1862 0.5467 0.8875
0.1328 0.5333 0.8593
0.0793 0.5200 0.8312
0.0749 0.5375 0.8263
0.0628 0.5566 0.8231
0.0507 0.5756 0.8199
0.0386 0.5946 0.8167
0.0265 0.6137 0.8135
0.0265 0.6209 0.8060
0.0266 0.6281 0.7984
0.0266 0.6353 0.7909
0.0266 0.6426 0.7833
0.0266 0.6498 0.7758
0.0267 0.6570 0.7682
0.0267 0.6642 0.7607
0.0384 0.6743 0.7436
0.1152 0.6949 0.6895
0.1920 0.7156 0.6355
0.2688 0.7362 0.5814
0.3456 0.7568 0.5274
0.4223 0.7774 0.4733
0.4991 0.7980 0.4192
0.5759 0.8187 0.3652
0.6527 0.8393 0.3111
0.6715 0.8444 0.2979
0.6903 0.8494 0.2846
0.7091 0.8545 0.2714
0.7279 0.8595 0.2581
0.7467 0.8646 0.2449
0.7655 0.8696 0.2316
0.7843 0.8747 0.2184
0.8136 0.8817 0.1979
0.8429 0.8888 0.1774
0.8722 0.8959 0.1569
0.9015 0.9029 0.1365
0.9308 0.9100 0.1160
0.9601 0.9170 0.0955
0.9611 0.8977 0.0983
0.9633 0.8576 0.1041
0.9656 0.8175 0.1100
0.9678 0.7774 0.1158
0.9785 0.7183 0.1439
0.9893 0.6591 0.1719
1.0000 0.6000 0.2000]);
% Create axes
axes1 = axes('Parent',figure1,'BoxStyle','full','Layer','top');
box(axes1,'on');
hold(axes1,'on');
% Create contour
contourf(GRx,GRy,GRz,'LevelStep',1);
% Create colorbar
h = colorbar('peer',axes1);
set(h, 'Limits', [0 12],'FontName', 'Arial', 'FontSize', 18,...
'FontWeight','bold','Color','k')
caxis([0 12])
hold on
%Plot data points on top of contour plot
plot(GRx,GRy,'k.','MarkerSize', 5)
set(gca, 'FontName', 'Arial', 'FontSize', 18)
xlim([5 50])
ylim([100 1550])
set(gca, 'XTick', [0 5 10 15 20 25 30 35 40 45 50],...
'XScale', 'linear',...
'YTick', [250 500 750 1000 1250 1500],...
'YScale', 'linear',...
'Ycolor',[0 0 0],...
'Xcolor',[0 0 0],...
'FontSize', 18,...
'FontName', 'Arial');

0 commentaires
Réponses (0)
Voir également
Catégories
En savoir plus sur Contour Plots dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!