INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Remember Me

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.
Jobs from Indeed

Just copy and paste the

# Plotting a 4 quadrant graph in Excel

Share

## 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 ?

G LS
spsinkNOJUNK@yahoo.co.uk
Remove the NOJUNK to use.

### RE: Plotting a 4 quadrant graph in Excel

Hey GLS,

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.

### RE: Plotting a 4 quadrant graph in Excel

xlhelp,

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

### RE: Plotting a 4 quadrant graph in Excel

(OP)
Thanks folks.

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.

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Close Box

# Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!