官术网_书友最值得收藏!

  • Minitab Cookbook
  • Isaac Newton
  • 476字
  • 2021-07-16 12:29:22

Creating bar charts of categorical data

The bar chart tools in Minitab offer some of the most flexible graphs for use. Many different styles of bar charts are available. The choices here allow us to use categorical data with the Counts of unique values selection. We could create bars of mean values, totals, medians of a set of numeric data from the Function of a variable option, or plot the values from a table.

Here, we will create a bar chart of the data in the Pulse.MTW worksheet. We will display the number of smokers and nonsmokers by gender for a group of students. As the columns are categorical, we will use the Counts of unique values bar charts.

How to do it…

The following instructions will create a stacked bar chart showing the number of smokers and nonsmokers among a group of male and female students.

  1. Go to the File menu and select Open Worksheet….
  2. Click on the button labeled Look in Minitab Sample Data folder.
  3. Open the Pulse.MTW worksheet.
  4. Go the to Graph folder and select Bar Chart….
  5. From the displayed charts, select the Stack style of the bar chart.
  6. Enter Sex first and Smokes second; the dialog should appear as follows.
  7. Click on OK.
    How to do it…

How it works…

The first column is used as the outermost or the lowest category on the x axis. Here this is the Gender column. The final column is used as the stacked column. In the following graph, we will see the value of smokes being stacked inside the results for gender. The values of Sex are 1 for male and 2 for female; the values of Smokes are 1 for regular smokers and 2 for nonregular smokers. Up to four categorical columns can be used in stacked or unstacked bar charts

How it works…

There's more…

The results can also be displayed as a percentage of all the data or as a percentage within each gender.

The option to show the results as a percentage can be found by right-clicking on the chart and then selecting Graph Options… from the right-click menu.

There's more…

Across all categories will display each level as a percentage of the total result. For example, female smokers represent 8.7 percent of the students.

Within categories at level 1 (outermost) displays the levels of smokers as a percentage within that of gender. For example, 22.86 percent of females part of this study smoke.

You can use the example of coding data to convert numeric values to text present in Chapter 1, Worksheet, Data Management, and the Calculator, to display text instead of numbers on this chart.

See also

  • The Coding a numeric column to text values recipe in Chapter 1, Worksheet, Data Management, and the Calculator
  • The Creating a bar chart with a numeric response recipe
  • The Creating Pareto charts recipe
主站蜘蛛池模板: 天峻县| 邹平县| 华宁县| 黑龙江省| 濮阳市| 南康市| 昔阳县| 张北县| 咸阳市| 博白县| 长春市| 吕梁市| 奉贤区| 米泉市| 衡阳市| 乌兰察布市| 东港市| 宁海县| 武胜县| 广平县| 武穴市| 织金县| 哈尔滨市| 彰化县| 巴塘县| 徐汇区| 南阳市| 汶川县| 航空| 满洲里市| 九江县| 隆安县| 通榆县| 禹城市| 华阴市| 阳泉市| 蒙阴县| 上饶市| 大安市| 兴和县| 手游|