+ Reply to Thread
Results 1 to 13 of 13

Adding median lines to xy scatter graph

Hybrid View

  1. #1
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Adding median lines to xy scatter graph

    Hi,

    This is probably one for Andy, but ideas welcome from all.

    I have two sets of data (i.e. several rows and two columns), both with values in the range 0 - 1. I'm plotting these on an xy scatter chart

    The two median values for these two sets of data now need to be plotted on the chart as two lines, one horizontal and one vertical, effectively dividing the chart into 4 quadrants.

    At the moment I've been achieving this functionality somewhat artificially, by superimposing 4 rectangle objects on the chart and adjusting their dimensions manually to coincide with the two median values on the two axes.

    In addition I've been manually adding two text boxes each containing one of the median values and positioning it next to the appropriate median 'line'.

    My question is this.

    Is there a neater way of achieving this functionality without the somewhat artificial method of resorting to overlaid rectangles?

    I can adjust the 4 rectangles programatically by changing the height and width property, but the text box needs to be positioned and there doesn't appear to be a Top and Left property.


    All ideas gratefully received. Usual TIA
    Last edited by Richard Buttrey; 10-26-2008 at 08:14 PM.

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Why not add two series, each with two points?

    xmed, ymin
    xmed, ymax

    xmin, ymed
    xmax, ymed
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    Hi shg,

    Good lateral thinking I'll give that a whirl.

    Ah, just remembered that it's the individual x,y plots that are the relevant factor here - hence the x,y scattergraph. A straight forward series plot wouldn't achieve that.

    One of the other requirements was to have two different fill colours for the top right hand and bottom left quadrants - hence the artificial use of overlaid rectangles.

    Any thoughts on that aspect?

    Regards
    Last edited by Richard Buttrey; 10-18-2008 at 05:14 PM.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    A straight forward series plot wouldn't achieve that.
    Wouldn't achieve what?
    One of the other requirements was to have two different fill colours for the top right hand and bottom left quadrants - hence the artificial use of overlaid rectangles.
    Create a picture having the desired quadrant colors using your favorite draw program, and then use it to fill the plot area:

    Format > Selected Plot Area, Fill Effects, Select Picture ...

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464
    Sorry, didn't explain that well enough. The two series lines would just plot a line, or points for each series. What's needed is the co-ordinate plot of each pair of values.

    As for the rectangles, if you think of the whole chart area, it will be dotted with plotted points. Each of the two series has a median value. Those two median values need to be used to somehow divide the chart into 4 quadrants, by adding the median lines perpendicular to both the x & y axes. The upper right and lower left quadrants thus formed need to have a coloured background.

    I've been using overlaid rectangles to achieve this, but manually dragging the borders to the appropriate points on the chart. I know I can do this programmatically, I just wondered if there was any chart functionality that would achieve the same thing. The other requirement is to position two text boxes, each of which contains the text "Median = 23" (or whatever the median value is), close to the median line.

    Thanks for your input.

    Regards

  6. #6
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,440
    Can you post example of your data set and if possible one that has the autoshapes to provide colour and labeling.

    It's certainly possible to use additional series to draw the quadrents and even hold Median information. The biggest problem is the colouring of sectors.
    This is not an automatic feature in Windows, although I think the Mac version can do filled xy-scatters.

    Would a coded solution be usable?
    Cheers
    Andy
    www.andypope.info

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Broken Lines on my Scatter Graph
    By chrismann85 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 05-22-2008, 05:18 AM
  2. Labelling individual points on a scatter graph
    By Amethyst in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 11-02-2007, 02:57 AM
  3. Scatter Graph with Trendline and Trend band!
    By ssrirao in forum Excel Charting & Pivots
    Replies: 8
    Last Post: 05-23-2007, 04:14 AM
  4. Plotting points on a scatter graph
    By Hodged in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 04-04-2007, 07:36 AM
  5. 3D scatter graph i.e X, Y, Z, scatter graph
    By SuperNomad in forum Excel General
    Replies: 3
    Last Post: 03-27-2007, 03:06 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1