How do I display lines over points in biplot?

5 ビュー (過去 30 日間)
Ellen Maas
Ellen Maas 2017 年 3 月 24 日
回答済み: Pedro Dreyer 2017 年 6 月 26 日
Hi everyone,
I am creating a couple of biplots from the outputs of the "pca" function. The "biplot" function seems to have a couple of bugs, unless there are parameters I can call to adjust them.
What I am most concerned about is my point cloud displaying on top of my lines, as you see below, as a fourth variable is completely obscured:
The alignment of the PC2 axis label is also irritating, but I can live with it if there's nothing I can do about it. Mostly I need to know if the points-over-lines thing is a bug, or a feature I can flip.
Thanks for any insight!
Ellen

回答 (2 件)

Omanshu Thapliyal
Omanshu Thapliyal 2017 年 3 月 28 日
If the figure object that you wish to move to the top (or bottom) of the figure has a common property, you could use the uistack function to set that object's property. E.g., if you want to move the red dots to the bottom of your biplot, you could do this:
redMarker = findobj(gcf,'Color', [1,0,0]);
uistack(redMarker,'bottom');
Similarly, you could grab hold of any object and move it anywhere using 'uistack'.
  1 件のコメント
Ellen Maas
Ellen Maas 2017 年 3 月 28 日
Thank you for responding, however, my question isn't about moving the objects around the graph, but the order in which the objects are drawn. It appears that the lines are drawn first, then the points on top, which obscures the lines. I want the points to draw first, then draw the lines, so I can see them all.

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


Pedro Dreyer
Pedro Dreyer 2017 年 6 月 26 日
Try This
chH = get(gca,'Children')
set(gca,'Children',[chH(end:-1:1)])

カテゴリ

Help Center および File ExchangeDimensionality Reduction and Feature Extraction についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by