Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Scatter Plots in Excel

Status
Not open for further replies.

pradipto

Programmer
Apr 29, 2002
22
US
Hi, I want to overlay a scatter plot in Excel with a line chart. How do I go about it ? Any introductory code will be great help. Basically, I have to plot scatter points between two series say X and Y and then overlay it with a couple of linear lines that bound the scatter plot (like X=a+bY, X=c+dY etc). Excel doesn't seem to have any functionality in its chart wizard to overlay two different charts.
 
You don't need two different chart types - just use one XY-type with two series; use the first series for the scatter points (format it as having no lines, and whichever markers you'd like). use the second series for the line(s), formatting it as having only lines, no markers.
The series data on your sheet need have only the starting and ending points for each line (if your lines are indeed straight). If you want to plot more than one line, you can use just one series, leaving a blank row between the different lines so Excel doesn't try to connect them. For example, if your series refers to the following range:
Code:
0  1
10 5

1  0
10 6
then Excel will draw two lines, one between (0,1) and (10,5), and one between (1,0) and (10,6)
Rob
[flowerface]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top