Is it possible to draw clustergram on UIAxes in app designer?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Mohammad Shahbazy
am 29 Aug. 2021
Kommentiert: Cris LaPierre
am 30 Aug. 2021
Hi All,
I tried the following code to draw clustergram over UIAxes, but it does not work.
X = rand(20,10);
app.UIFigure.HandleVisibility = 'on';
set(0, 'CurrentFigure', app.UIFigure);
set(app.UIFigure,'CurrentAxes',app.UIAxes);
cgo = clustergram(X);
app.UIFigure.HandleVisibility = 'off';
Would you please guide me to resolve this code?
Thanks
0 Kommentare
Akzeptierte Antwort
Cris LaPierre
am 30 Aug. 2021
Part of the challenge is that clustergram creates its own figure window rather than looking for one to plot into.
Here's something that worked for me, but it means the only thing the app can show is the clustergram, as it takes over the entire app figure.
X = rand(20,10);
cgo = clustergram(X);
plot(cgo,app.UIFigure)
Also note that a separate figure window with the clustergram still appears. if you want to stop that from happening, see this answer.
2 Kommentare
Cris LaPierre
am 30 Aug. 2021
I am not aware of a way of preventing clustergram from creating a figure. However, if you read through the answer I linked to, someone there proposes a solution.
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Data Import and Management finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!