Hallo,
I have a big calculation with more than 5 results each with his own figure/graph. I want to make a GUI with only one graph and a listbox where i can choose which of my results is loading into my graph and not a figure window for each result.
I wrote a simple Version of my Code for an short Impression of my Problem (.txt file) I didnt know how to override the complete previus plot.

댓글 수: 2

Rik
Rik 2018년 8월 8일
You can either create all graphs in separate axis objects and set the visibility with your listbox callback, or recreate the selected graph with your listbox callback. The graphical calculation shouldn't take too long, even if calculating the underlying data takes ages.
Thomas
Thomas 2018년 8월 8일
@Stephan, Rik Some of my Results are just a Table of Calculation Results Some are 3D plots and some are normal 2D So plotting them in one axes and change die Visibility wont work or?

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

 채택된 답변

Stephen23
Stephen23 2018년 8월 8일
편집: Stephen23 2018년 8월 8일

0 개 추천

One efficient solution is to plot all of the data in one/several axes, then just set the axes/line/patch/... Visible properties to select which ones can be seen. See my FEX submission brewermap_view's 2D/3D switch for an example of this:
This lets you plot your data continuously, but only show the user what they have selected, quite independently. As an alternative you could plot/create the line/patch/... objects, and then set their XData, YData, etc, when you want to change the plots.

댓글 수: 4

Stephen23
Stephen23 2018년 8월 8일
Thomas's "Answer" moved here:
@Stephan, Rik Some of my Results are just a Table of Calculation Results Some are 3D plots and some are normal 2D So plotting them in one axes and change die Visibility wont work or?
Stephen23
Stephen23 2018년 8월 8일
편집: Stephen23 2018년 8월 8일
I wrote in my answer "...plot all of the data in one/ several axes". Use as many axes as you need, it makes no difference to this method. The example I gave you (my FEX submission) uses two axes (one 2D, one 3D), but clearly you can use as many as you want. Just set the axes and plot objects 'Visible' properties as you switch between them.
Thomas
Thomas 2018년 8월 8일
ok i will try this too.
Or is it possible to paste a complete figure(1) window into the main GUI window? I know this isnt the nice programming method, but all result figures allready exist and then i dont have write it new.
Stephen23
Stephen23 2018년 8월 8일
편집: Stephen23 2018년 8월 8일
@Thomas: you could use copyobj, something like this:
As you wrote, "this isnt the nice programming method", but it should work.

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Interactive Control and Callbacks에 대해 자세히 알아보기

태그

질문:

2018년 8월 8일

편집:

2018년 8월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by