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 cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

plotting lines (graphs) in excel using x,y coordinates 3

Status
Not open for further replies.

rk_19

Structural
Joined
Aug 7, 2012
Messages
71
Location
AE
Hi, i have 2 sets of x,y points ie; x1,y1 and x2,y2 ; i wish to plot a line between x1,y1 and x2,y2 - how do i do this in excel. my requirement is presented in the snap shot attached. the first line should have starting coordinate x1,y1=0,0 and its ending point at x2,y2 = 0,3. line 2 should have starting coordinates as x1,y1 = 1,2 and end coordinates x2,y2 as 5,6 and so on. thanks
 
 http://files.engineering.com/getfile.aspx?folder=98466ba9-238d-4342-a476-18ac1d4808d7&file=excel-line_from_points.PNG
A gap in the listing of coordinates will result in a gap in the graph
test_s2zefh.gif


TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! faq731-376 forum1529 Entire Forum list
 
thanks. that helps
 
Note you need to ensure you have 'gaps' selected here to achieve exactly what IRstuff noted, its the default I believe but if you get extra lines with the gaps in your data someone may have changed the default action & this is the cause (this menu is available within the right click 'select data' form).

Untitled_zx39fy.png


Another option is to simply draw each line with a separate data series, this way would allow you to apply different formatting to each separate line and markers (if its required). I'm sure if there is lots of data you could create the series with some VBA quite easily. If you don't need to format each line differently IRstuff's solution is much more efficient.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top