溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點(diǎn)擊 登錄注冊 即表示同意《億速云用戶服務(wù)條款》

plot繪圖填充的方法是什么

發(fā)布時(shí)間:2022-01-14 10:04:43 來源:億速云 閱讀:186 作者:iii 欄目:大數(shù)據(jù)

這篇“plot繪圖填充的方法是什么”文章的知識點(diǎn)大部分人都不太理解,所以小編給大家總結(jié)了以下內(nèi)容,內(nèi)容詳細(xì),步驟清晰,具有一定的借鑒價(jià)值,希望大家閱讀完這篇文章能有所收獲,下面我們一起來看看這篇“plot繪圖填充的方法是什么”文章吧。

%% 簡單曲線

x = -2*pi:pi/100:2*pi;

fx = sin(x);


figure('Color','w');

%設(shè)置figure顏色為白(去掉四周灰色部分)

subplot(1,2,1);

hold on

plot(x,fx);

plot(2*x+pi/2,0.5*fx+0.1*x);

hold off

title('plot');


subplot(1,2,2);

hold on

plot_shaded(x,fx);

plot_shaded(2*x+pi/2,0.5*fx+0.1*x);

hold off

title('plot\_shaded');

plot繪圖填充的方法是什么          


%% 直方圖

X1 = 3 + 2.0*randn([100000,1]);

X2 = 12 + 4.0*randn([100000,1]);


figure('Color','w');

hold on

plot_histogram_shaded(X1,'Alpha',0.3);

%參數(shù)Alpha為透明度

plot_histogram_shaded(X2);

hold off

title('plot\_histogram\_shaded');

plot繪圖填充的方法是什么          


%% 分布圖

X = 1:0.25:10;

Y = sin(X)+0.25*X;

Y_error = randn(1000,numel(Y));

Y_noisy = Y+Y_error.*repmat(0.1*X,[size(Y_error,1) 1]);


figure('Color','w');

subplot(3,1,1);

plot(X,Y,'LineWidth',1.5);

title('plot (True value y=f(x))');

ylim([-1 5]);


subplot(3,1,2);

hold on

plot(X,Y,'LineWidth',1.5);

plot_distribution(X,Y_noisy);

hold off

title('plot\_distribution');

ylim([-1 5]);


subplot(3,1,3);

hold on

plot(X,Y,'LineWidth',1.5);

%參數(shù)LineWidth為線寬

plot_distribution_prctile(X,Y_noisy,'Prctile',[25 50 75 90]);

%參數(shù)Prctile為要繪制的百分位值

hold off

title('plot\_distribution\_prctile');

ylim([-1 5]);       

plot繪圖填充的方法是什么            

以上就是關(guān)于“plot繪圖填充的方法是什么”這篇文章的內(nèi)容,相信大家都有了一定的了解,希望小編分享的內(nèi)容對大家有幫助,若想了解更多相關(guān)的知識內(nèi)容,請關(guān)注億速云行業(yè)資訊頻道。

向AI問一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI