how to add 2d plot in 3d?

1 回表示 (過去 30 日間)
priya anjali
priya anjali 2021 年 3 月 17 日
コメント済み: Bjorn Gustavsson 2021 年 3 月 17 日
I want my 3d plot to be view like this. Here there is a surface plot and by rotating that 3d surface plot they have displayed with a small 2d view of u(x,t) and t axis view. How should I do it?

回答 (1 件)

Bjorn Gustavsson
Bjorn Gustavsson 2021 年 3 月 17 日
編集済み: Bjorn Gustavsson 2021 年 3 月 17 日
I'd do something like this:
clf
surf(t,x,U+3,U),shading flat
hold on
pcolor(t,x,U),shading flat
ax1 = gca;
ax2 = axes('position',[0.7 0.7 0.2 0.2]);
plot(t(500,:),U(500,:),'.-','MarkerIndices',1:20:1000)
axes(ax1) % just to make the main axes the current one.
HTH
  2 件のコメント
priya anjali
priya anjali 2021 年 3 月 17 日
It not working
Bjorn Gustavsson
Bjorn Gustavsson 2021 年 3 月 17 日
What not working

サインインしてコメントする。

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by