Plotting two categorical variables against a continuous variable, map continuous variable to colorbar or marker size

6 ビュー (過去 30 日間)
Hello,
I would like to construct a plot that has a categorical variable on the y-axis (protein names) and another categorical variable on the x-axis (treatment conditions), and numerical data (expression values) scaled to a colorbar or marker size. How might I go about doing this?
Thanks!
  3 件のコメント
Michael Wagner
Michael Wagner 2019 年 11 月 15 日
Thanks for your quick reply!
I think I may have figured something out-- I just used the heatmap function. I imported protein names as a string array ("proteins") and created a numeric matrix of the expression data by copying and pasting from Excel ("cdata"). From there I created a cell array of the categorical conditions ("conditions"). I used this code:
h=heatmap(conditions, proteins, cdata)
ratio_SNO_heatmap.png
I'm fairly pleased with the result, but I do think it would be better if instead of the colormap, marker size scaled to cdata would be a better visual for my results. I don't know where to start with that process, however.
Adam Danz
Adam Danz 2019 年 11 月 15 日
編集済み: Adam Danz 2019 年 11 月 15 日
Nice work!
If you want to represent magnitude by marker size, here are some functions to look into that allow you to change the marker size of each point.

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

回答 (0 件)

カテゴリ

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

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by