在Matlab中平滑图形线

时间:2014-04-23 14:16:07

标签: matlab graph smoothing loess

我有以下图表,我希望通过平滑图表使其更令人愉悦。有可能吗?

enter image description here

tempyr = 1880:1:2014;  
temperature = temp(1:2, 1:135);
Tempval = {'Annual Mean','5 Year Mean'}
TH = zeros(size(Tempval));
hold on
TH = plot( tempyr', temperature', '-o', 'Marker', '.');
xlabel( 'year', 'fontsize', 24); ylabel( 'Temperature Anomaly (Degree Cel)', 'fontsize', 24 );
legend(TH, Tempval)
grid on

理想图表。 enter image description here

1 个答案:

答案 0 :(得分:1)

尝试

TH = plot( tempyr', temperature', '-o', 'Marker', '.','LineSmoothing','on');

并查看here,尤其是export_fig引用可能会有用。