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

Drawing on a graph (scatter plot)

Status
Not open for further replies.

kreuz

Programmer
Oct 30, 2003
5
US
In excel, I have graphed my data using a scatter plot. I now want to write a macro to draw lines between certain data points on the graph. Here is my problem. How do I relate the graph’s coordinate system and my data? I believe the ActiveChart.Shapes.AddLine command uses twips for coordinates. Is there an easy way to identify my plotted points in this coordinate system? Thank you.
 
Hi,

I don't know of a way to identify the shape coordinates from the top/left corner of the sheet.

What are you trying to accomplish?

Could it be done with another series using "invisible" lines to block out some of the lines of series 1?

Skip,
Skip@TheOfficeExperts.com
 
Hi Skip,

I am plotting the electrical contacts of an IC that are interconnected in adjacent pairs. I have the XY location of each of 1800 contacts which I graphed using a scatter plot. I now want to show the interconnections between the adjacent pairs. I want to write a macro to draw the lines (900) between the desired points on the graph to show the interconnection. That is why I asked about relating the coordinate system for the AddLine command and the graphed XY data. To actually graph the links I would think I would need 900 different series. Knowing the scope of my task, do you think that would work? Thanks for your response and I appreciate any ideas you may have.
 
Sure.

Make each circuit a series.

BTW, John Walkenbach has a book on Excel Charts that employs x-y charts to "draw" interesting things. I have used them to plot a floor plan.

:)

Skip,
Skip@TheOfficeExperts.com
 
No need to make separate series. Make one long series, with blank rows in between the rows representing interconnecting points. For example a series

Code:
0  1
1  0

2  2
3  3

will draw a line between 0,1 and 1,0 and also a line between 2,2 and 3,3 but no line between 1,0 and 2,2


Rob
[flowerface]
 
Thanks for the ideas Skip and Rob!! Ill give it a shot! Thanks again
 
Hi Skip and Rob,
I thought I let you know how I made out. For fun, I tried both methods, seperate series and a single series. On the separate series method, there is a limit to the number of series you can add which I found to be 255. The single series method worked fine. Thanks for the help, I was making this more difficult than it need to be. Have a great day and thanks again!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top