フィルターのクリア

gplotmatrix with continuous 3rd parameter

1 回表示 (過去 30 日間)
F S
F S 2017 年 10 月 27 日
コメント済み: Walter Roberson 2017 年 10 月 30 日
Hi,
I would like to plot a gplotmatrix, but instead of coloring the marks according to grouping variables (eg. [1, 2, 3, 4]) with distinct colors I would like to color them depending on a 3rd continuous parameter (eg. [1 1.01 1.02 .... 3.99 4]) using a colormap like jet.

採用された回答

Walter Roberson
Walter Roberson 2017 年 10 月 27 日
gplotmatrix() is not able to do that. The scatter-looking plots that gplotmatrix() creates are not scatter objects: they are line objects. line objects cannot have different colors for different points.
You could, hypothetically, use gplotmatrix() to create the data, and then loop through the returned line objects (first output), replacing each line with a scatter plot using the same information but setting CData as appropriate. You would have to figure out what the source and destination columns are for each object in order to pick out the appropriate continuous information to use as the colour.
  4 件のコメント
F S
F S 2017 年 10 月 30 日
Thank you for the detailed explanation! Starts to make sense. So when it plots the n groups of data in the gplotmatrix with n colors, does it then just overlay n lineplots with LineStyle 'none' with different colors above one another?
Walter Roberson
Walter Roberson 2017 年 10 月 30 日
Yes, that is correct.
Earlier I said that it returns C x C x 2. I should have said C x C x G where G is the number of groups.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGraphics Object Properties についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by