Hist3, height bar depends on a third variable

3 ビュー (過去 30 日間)
Luis Lopez
Luis Lopez 2015 年 12 月 11 日
編集済み: Luis Lopez 2015 年 12 月 11 日
bars height on hist3 depends on frequency of first and second variable. How can I height of those bars be related to another variable. Maybe hist3 is not the right function to achieve that.
Thanks

回答 (1 件)

arich82
arich82 2015 年 12 月 11 日
What about bar or bar3? For bar3, the height of the bar is whatever you specify, e.g.
x = 1:5;
y = 1:10;
[X, Y] = meshgrid(x, y);
Z = sqrt(X.^2 + Y.^2);
figure;
bar3(y, Z);
axis tight;
Does this do what you want? If not, please explain in the comments.
  1 件のコメント
Luis Lopez
Luis Lopez 2015 年 12 月 11 日
編集済み: Luis Lopez 2015 年 12 月 11 日
I have 3 vectors, same lenght (1000 x 1), I want to plot first and second variable as X and Y in the graph, group first and second variable in range to get only 5 x 4 or something else ranges.Z is the third variable and gets the height of every bar that is in the range. Hope I explain a little bit more.

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

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by