フィルターのクリア

How to put the figure on on uipanel?

47 ビュー (過去 30 日間)
Muhammad Farooq Zia
Muhammad Farooq Zia 2018 年 8 月 9 日
コメント済み: Ameer Hamza 2018 年 8 月 9 日
I am trying to display a figure that opens in a separate window on a uipanel. The attached picture describes what I want. I am also attaching the part of code that generates the figure. Please help me out with this.
figure
title('Fw and dFw/dSw')
xlabel('Sw') %%
yyaxis left
plot (x,y3,tangx,tangy)
ylabel('Fw')
ylim([min(y3) max(y3)])%%
yyaxis right
plot (x,y4)
ylabel('dFw/dSw')
ylim([min(y4) max(y4)])%%
grid on
grid minor
legend('Fw','Tangent','dFw/dSw')
legend('Location','NorthWest' )

採用された回答

Ameer Hamza
Ameer Hamza 2018 年 8 月 9 日
You can't directly plot on the uipanel object. You first need to overlay an axes object in the panel and then plot on the axes object. For example, try
h = figure;
p = uipanel('Title','Panel', 'Position',[.1 .1 .8 .8]);
ax = axes(p);
plot(ax, 1:20, 1:20)
  4 件のコメント
Muhammad Farooq Zia
Muhammad Farooq Zia 2018 年 8 月 9 日
It works...Thanks a lot bro
Ameer Hamza
Ameer Hamza 2018 年 8 月 9 日
You are welcome.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeInteractive Control and Callbacks についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by