フィルターのクリア

Highlight a point in plot

7 ビュー (過去 30 日間)
Lightisthenight
Lightisthenight 2019 年 5 月 13 日
コメント済み: Lightisthenight 2019 年 5 月 14 日
Hello,
I have a graph which contains many points. The red points in the plot overlap the green and blue point. How can I highlight the blue and green point and preserve the red points such that the blue and green points are easily seen? I tried to increase the markersize before, but this looks kind of bad. Thank you for your helpBildschirmfoto 2019-05-13 um 20.09.17.png

採用された回答

Adam Danz
Adam Danz 2019 年 5 月 13 日
編集済み: Adam Danz 2019 年 5 月 13 日
Option 1: hollow markers
If you use hollow markers such as 'o', 's', 'd', with MarkerFaceColor set to None and LineWidth set to 0.5, you'll be able to see through the markers. If your data are dense enough, you still may not have a good representation of the density of your data.
Option 2: transparency (for scatter plots only)
Using solid markes, set the MarkerFaceAlpha to something like 0.2 which makes the markers transparent. You could apply this to the MarkerEdgeAlph as well (works with scatter objects only)
Option 3: use a heatmap
Compute the density of your data using histcounts2() and then use heatmap() or imagesc() or contourf() to plot the density of each group of data.
If you have any questions about these methods, feel free to leave a comment below.
  4 件のコメント
Walter Roberson
Walter Roberson 2019 年 5 月 13 日
Depending on how you are creating the graph, you might be able to simply draw the non-red after the red. When there are flat objects in the same Z coordinate then the one drawn last is (by default) the one displayed "on top". There is also uistack() to reorder items already drawn.
Lightisthenight
Lightisthenight 2019 年 5 月 14 日
Thank you Mr. Roberson. I forgot to mention that this graph was a 3d plot and i adjusted the viewing angle with view(). I also tried to method you mentioned before, but with no success

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeData Distribution Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by