- In this worksheet you will learn how to use Excel to make a bar chart or a column chart
Suggested prerequisite(s)
- An understanding of tidy data. See https://www.youtube.com/watch?v=KW1laBLEiw0
Dataset
- This demonstration uses PairedDataset1.xlsx
Steps
- Open the dataset in excel using File -> Open and selecting PairedDataset1.xlsx
- You can see for each Sample (names listed in column A) we have measurements at Baseline, Condition 1 and Condition 2
- Note how the data is tidy with conditions in the columns, samples in rows and each cell has a single value
- We wish to make a barchart with the samples (rows) on the x-axis, the values (cells) on the y-axis and a bar per condition (columns).
- Select all the data by clicking on the first cell in the top right that contains ‘Sample name’ (i.e. cell A1)
- While holding down shift now select the bottom right cell (i.e. cell D11)
- This should now have all three columns and their sample names selected for comparison
- Click Insert from the top menu, then chart and then bar or column
- Column is preferable as vertical lines are easier to read
- This should produce the chart in the middle of your sheet and automatically detect that the sample names are in column A.
- We wish to store the chart in a different sheet so right click on a blank part of the chart and click ‘Move Chart’
- Click the button beside “New Sheet’ and give the chart a new name and click ok.
- Navigate to the new sheet you have created and you can see your chart there.
- Click on the chart and in the top left you should be able to click on ‘Add chart element’.
- Here you can add axis labels, remove the chart title (recommended) and change the positions of the labels (recommended to put to the right)
- Once happy with the chart you can save the new results using File -> Save
- You can also save the chart as an image by right clicking on the chart and selecting ‘Save as Picture’