Drawing on a Chart

R

Ron H.

I am using VBA in Excel to model some alignment errors in a test fixture.
The output is a multiple series scatter chart of the data. If I calculate
the center and radius of a circle that fits a part of the data (least
squares fit method), how can I draw the circle on a chart?

Ron H.
 
A

Andy Pope

Hi,

The simplest way is to use a series to draw the circle.
Add an extra data series to the chart plotted as xy-scatter line no markers.

You can calculate the circle using basic trig formula.

Assume,
X Center in cell D1
Y Center in cell E1
Radius in cell F1
Range G1:G360
Circle XY points in range G1:H360

G1: =$D$1+(COS(ROW()*(PI()/180))*$F$1)
H1: =$E$1+(SIN(ROW()*(PI()/180))*$F$1)

copy down for 360 rows.

Cheers
Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top