## Plotting a 4 quadrant graph in Excel

## Plotting a 4 quadrant graph in Excel

(OP)

Hi folks.

I'm usually a resident one the Access boards and I'm very comfortable with Access VBA so if the solution to this needs VBA I'm not worried .. ..

but the problem is this:-

I have a need to plot a single point on a chart.

X Axis limits 0 - 7

Y axis limits 0 - 2T The value of T us user entered into a cell

I need the chart to look like a 4 quadrant graph with a vertical dividing line at ( 3.5, 0 ) to ( 3.5, 2T )

and horizontal dividing line at ( 0,T ) to ( 7,T )

All of the above is easy with an XY scatter chart.

HOWEVER, I want to be able to colour the four quadrents in different colours

Top Right = Green

Bottom Left = Red

The other two = Orange

( I'd LIKE to be able to add some text as labels in the quadrents too but thats an added extra )

I've tried with semi-transparent Text boxes etc but when the user chages the value of T the absolute location of the horizontal axis changes somewhat.

How do I get the quadrant colour changes to occure at the T value boundary ?

I'm usually a resident one the Access boards and I'm very comfortable with Access VBA so if the solution to this needs VBA I'm not worried .. ..

but the problem is this:-

I have a need to plot a single point on a chart.

X Axis limits 0 - 7

Y axis limits 0 - 2T The value of T us user entered into a cell

I need the chart to look like a 4 quadrant graph with a vertical dividing line at ( 3.5, 0 ) to ( 3.5, 2T )

and horizontal dividing line at ( 0,T ) to ( 7,T )

All of the above is easy with an XY scatter chart.

HOWEVER, I want to be able to colour the four quadrents in different colours

Top Right = Green

Bottom Left = Red

The other two = Orange

( I'd LIKE to be able to add some text as labels in the quadrents too but thats an added extra )

I've tried with semi-transparent Text boxes etc but when the user chages the value of T the absolute location of the horizontal axis changes somewhat.

How do I get the quadrant colour changes to occure at the T value boundary ?

G LS

spsinkNOJUNK@yahoo.co.uk

Remove the NOJUNK to use.

## RE: Plotting a 4 quadrant graph in Excel

John Walkenbach probably has the answer in his latest Excel Chart book. I don't have it with me, but I know that it has the answer.

The quadrants can be drawn quite easily with x-y scatter. Yes, you will need to set the MaximumScale property via vba probably on the worksheet change event of the cell containing your T value.

Wish I was smart enough to give you the quadrant shading code.

Skip,

Skip@TheOfficeExperts.com

www.TheOfficeExperts.com

## RE: Plotting a 4 quadrant graph in Excel

http://www.geniusmedia.ca## RE: Plotting a 4 quadrant graph in Excel

I got ALMOST that far. I could never get the x-axis to display values -- still can't!

Skip,

Skip@TheOfficeExperts.com

www.TheOfficeExperts.com

## RE: Plotting a 4 quadrant graph in Excel

I'll have a mull over the stuff in the link that xlhelp posted.

Another approach that I've come up with in the mean time ( that I've just got working ( seems to work so far anyway ) is to reset my thinking with regard to the Y axis and instead of plotting 0 to 2T I'm plotting -T to T.

The horizontal Axis is always at Zero and the top and bottom axis move a little but it is not as noticable as the centre moving around.

Chears.

G LS

G LS

spsinkNOJUNK@yahoo.co.uk

Remove the NOJUNK to use.