how to plot a 2D graph on top of a 3D surf

i have a PSD spectrogram and want to plot on top of that a time series graph. In the link is what i want to achieve:<https://docs.google.com/file/d/0B61s6H8F7eyNVXFCNFVseFFaUUE/edit?usp=sharing>
Any idea?

댓글 수: 2

José-Luis
José-Luis 2013년 5월 23일
Such a plot is not going to happen automagically. I suggest you look into patch() and arm yourself with some patience. surf() could also work, depending on the kind of data you have.
DuckDuck
DuckDuck 2013년 5월 23일
i already created the spectrogram, but i want to put also the timeseries. the spectrogram is the fft of the time series. now i want to put them together and try to figure out the hole thing.

댓글을 달려면 로그인하십시오.

답변 (1개)

Iain
Iain 2013년 5월 23일

0 개 추천

I can't see the link, but if you have a surf, you can simply issue the commands:
hold on
plot3(x,y,z,colour)
To plot a line arbitrarily over/around/behind your surf. Set x, y or z = to a constant, and you can plot a line on an arbitrary plane.

댓글 수: 3

DuckDuck
DuckDuck 2013년 5월 23일
i tried but i didn't sucede.
Jan
Jan 2013년 5월 23일
@effess: Please post the code you have created so far an explain "did not succeed" with all necessary details.
so this is my code, i built the surf and when i plot the graph i get 'Error using plot3 Vectors must be the same lengths.'
figure;surf(tw(172,1:end),Fw,10*log10(afftp),'edgecolor','none');
axis tight;
view(0,90);
xlabel('Time (Seconds)');
ylabel('Hz');
hold on ;
plot3(tw(172,1:end),xhb(172,1:end),1)

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 Scatter Plots에 대해 자세히 알아보기

제품

질문:

2013년 5월 23일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by