How can I plot a 3D Histogram with one axis of categorical data?

6 ビュー (過去 30 日間)
Aseer Chowdhury
Aseer Chowdhury 2020 年 7 月 13 日
回答済み: Shubham Rawat 2020 年 7 月 22 日
Hi I'm trying to create a 3D histogram using hist3 and would like the following axes:
  1. x-axis: categorical data eg. the type of modification to the set-up
  2. y-axis: output data eg. time
  3. z-axis: frequency.
I understand how to get the y and z axis conditions, but I am unsure of how to get categorical data on one of the axes in a 3d plot.

採用された回答

Shubham Rawat
Shubham Rawat 2020 年 7 月 22 日
Hi Aseer,
For the hist3 function the user should need a 2D Matrix in which 1st column is x value, and 2nd column is y value. Then the function plots number of occurrences of the pairs x, y as the z parameter.
The 2D matrix has to be numeric in data in this function, for this you have to convert categories into numeric data.

その他の回答 (0 件)

カテゴリ

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

タグ

製品

Community Treasure Hunt

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

Start Hunting!

Translated by