2012-02-22 17 views
2

私は滝のようなプロットでプロットしたい一連のスペクトルデータを持っています。 細い線は、各スペクトルの差が多すぎるので有用ではありません。リボンを使用した滝のプロット

したがって、で有望なリボン機能を試してみたいです。

しかし、結果はまったく異なり、役に立たない!

figure(2); clf; 
ribbon(spectralSeries); 
shading flat % otherwise complete dark 
axis tight 

enter image description here

EDIT:

hold on; 
stepsize = 0.35; 
for k = length(series):-1:1 
    color = cmap(k,:); 
    data = spectralSeries(k,:) + (k-1)*stepsize; 

    hplot(k) = filledcurve(xaxis, data, 0);  
    set(hplot(k), 'FaceColor' , color*1.2) 
    set(hplot(k), 'EdgeColor' , color*0.5)  
end 
hold off; 
axis tight 

enter image description here

にもかかわらず、私はまだ午前:

私は今、私が欲しかったものに近いマニュアル滝プロットを作成元のソリューションに興味がある問題。

EDIT 2:ここでは

滝、リボンと私のカスタムコードと同じデータを使用した例。私のコードだけがデータを視覚化するのに便利です。私はまだこのコードは、今ここでリボン

ribbon(spectralSeries); 
shading flat % otherwise complete dark 
axis tight 
を使用して結果をいくつかのデータ

xaxis = linspace(-pi/2,3/2*pi, 1000); 
variation = [ 0.5 1 5 10]; 
spectralSeries = abs(sin(xaxis)'*ones(1,4) + sin(xaxis'*variation)*0.25); 

を作成するために使用されています...リボンや滝がまともなプロットのように見えるようにする方法を知っている

をしたいと思います

enter image description here

そして、ここで滝の

hplot = waterfall(spectralSeries); 
set(hplot, 'LineWidth', 4); 
hidden off; 

enter image description here

と比較しかし深さ軸せず、滝に類似している自分自身の書かれたコードを使用してプロットしました。しかし、それはまともな外観であり、各曲線間の変化を見ることができるようにデータ曲線を表示する唯一のものである。

enter image description here

+0

結果はどのように見えますか? – user1071136

+0

少なくともmatlab docuに表示されているプロットと似ています。http://www.mathworks.de/help/techdoc/ref/ribbon.html –

+0

データはどのように見えますか?その次元は何ですか? – user1071136

答えて

2

は、あなたはまだwaterfallを使用しますが、よりよい出力を得るために、いくつかのpatchaxesプロパティを設定することができます。重要なことは、spectralSeriesを転置する必要があることです。

figure 
xaxis = linspace(-pi/2,3/2*pi, 200); 
variation = [ 0.5 1 5 10 7 3.5 8]; 
spectralSeries = abs(sin(xaxis)'*ones(1,7) + sin(xaxis'*variation)*0.25); 
h = waterfall(spectralSeries'); 
cameratoolbar; 

%% 
set(h, 'FaceColor', 'flat'); 
set(h, 'FaceAlpha', 0.7); 
set(h, 'EdgeColor', 'k'); 
set(h, 'FaceVertexCData', rand(7,3)) 
set(gca, 'Color', [1 1 1]*0.85) 
set(gca, 'GridLineStyle', 'none'); 

%% 
myaa 

(オプション)最後の文myaaは、アンチエイリアス処理されたFigureを生成します。スクリプトhereを入手してください。

enter image description here

関連する問題