Plot X And Y On Excel
Recently my sister asked me to plot a bar chart in excel from a table of data. There were 5 different columns but she only wants to choose 2 columns, one going to X- Axis/Axes or Y-Axis/Axes. Now initially when I heard about this, I thought ohh, its just a piece of cake. Right because excel is known for its charts and it should be easy. Use a scatter plot (XY chart) to show scientific XY data. Scatter plots are often used to find out if there's a relationship between variable X and Y.
Usually with row or column plots in excel, one axis is categorical dat and other is numerical. However with some tricks, we can create a bar plot (row or column plot). Here is the trick.Set X and Y axes Click inside the table. Navigate to Insert Charts Insert Scatter (X, Y) or Bubble Chart. Choose Scatter with Straight Lines. First thing you need to realize is that XYZ data is plotted in three columns, X, Y and Z. In order for Excel to plot this into a 3D Surface graph the data must be in a MESH format. A MESH format is a structure that contains rows and columns, much like a spread sheet.
(1) With a dummy dataset (where A column as names - not numbers and B column has number ) create a bar plot.
(2) Replace A column values with small bins created (minimum unit of data - for example 0.1 if our data is single decimal point or 1 if our data has no decimal point) in the range of Y data. Now trick is to fill Y value. For example if the width of bar is from 0.3 to 0.12 and height is 8, then we need to fill the cells like this:
X Y
0.03 | 8 |
0.04 | 8 |
0.05 | 8 |
0.06 | 8 |
0.07 | 8 |
0.08 | 8 |
0.09 | 8 |
0.1 | 8 |
0.11 | 8 |
0.12 | 8 |
If there no data point in the X region keep it blank. Remove gap between bars by setting the series option bar gap to 0. You can manipulate labels (if over crowded) displayed after certain intervals.
Switch X And Y Axis On Excel Scatter Plot
In similarway we can plot stacked barplot.
Only Markers Straight Lines
Use a scatter plot (XY chart) to show scientific XY data. Scatter plots are often used to find out if there's a relationship between variable X and Y.
Only Markers
To find out if there is a relationship between X (a person's salary) and Y (his/her car price), execute the following steps.
1. Select the range A1:B10.
2. On the Insert tab, in the Charts group, click the Scatter symbol.
3. Click Scatter.
Result:
Note: we added a trendline to clearly see the relationship between these two variables.
Straight Lines
To create a scatter plot with straight lines, execute the following steps.
1. Select the range A1:D22.
2. On the Insert tab, in the Charts group, click the Scatter symbol.
3. Click Scatter with Straight Lines.
Note: also see the subtype Scatter with Smooth Lines.
Excel How To Change X And Y On Scatter Plot
Result:
Box And Whisker Plot Excel
Plot X And Y Graphs On Excel
Note: we added a horizontal and vertical axis title. The horizontal axis of a scatter plot is a value axis, so you have more axis scaling options (the same as a vertical axis which always is a value axis).