Making line graphs in Microsoft's Excel sometimes is not as easy as it would seem. This is especially true when you are trying to plot X and Y values, not just Y values. The solution to this problem is to use the X-Y Scatter Plot. Lets walk through the process of creating a graph that requires both X and Y values. We've had a lot of students ask us about making this type of graph in Excel, and hopefully, this will help a lot of people. This procedure should work on both Windows 95 and Windows 3.1 versions of Excel.
First, you need to enter the data into your Excel spreadsheet. In the first column, place your X data, and in the second column the Y data. You can have more columns of Y data if you wish. Now that you've entered the data, drag the mouse to highlight both columns. When the data is selected, click on the Chart icon on the toolbar, or select Insert... Chart. Then drag a square in the document where you would like the chart placed. You will then be prompted for a chart type. Select X-Y Scatter Plot. Now, pick the look of your graph. You can have points, lines with points, just lines, and logarithmic graphs. Follow the prompts, entering in any graph titles that you would like, and click the Finish button.
The result of all this should be a graph with X and Y values plotted, not just Y values like the chart type Line Graph gives you. Sometimes, you want a trendline displayed on the graph. Excel can display linear and polynomial trend lines. First, double click on the graph, and then click on the line in the graph that you want to best-fit. Now, pull down Insert and select Trendline. Pick the type of trendline that you would like and click Ok.
If you have any questions, about this column or about something else, please contact us. The Computer Help Desk is located in Fuller Labs, room B21, feel free to stop by. You can also e-mail us at helpdesk@wpi.edu or call us at 831-5888. If you have any suggestions for future Tip of the Week columns, please let us know.