+ Reply to Thread
Results 1 to 5 of 5

Can you OffSet the X Y Center axis of a scatter Chart?

  1. #1
    Registered User
    Join Date
    10-01-2012
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    8

    Can you OffSet the X Y Center axis of a scatter Chart?

    I have a scatter chart and I would like to offset the Center of the X and Y Axis.
    Can this be done with a formula int he cell?
    Can this be done using a little VB?

    Thank You,

    WhyWhy

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,907

    Re: Can you OffSet the X Y Center axis of a scatter Chart?

    It's not clear to me exactly what you are trying to accomplish. If I had to guess, I would suggest you look at the "axis crosses at" property of each axis. By default, Excel's automatic choice is to have the axes cross at 0,0, but this option (which can be accessed in the "format axis" on the "scale" tab) can be used to force the axes to cross at whatever point you would like.

  3. #3
    Registered User
    Join Date
    10-01-2012
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Can you OffSet the X Y Center axis of a scatter Chart?

    Yes I am trying to figure ot how to setup a formula in a cell that would change the center of the chart from 0,0 to say X,Y. And X,Y would be the average value from my data set.

  4. #4
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP and 2007
    Posts
    15,907

    Re: Can you OffSet the X Y Center axis of a scatter Chart?

    To my knowledge, there is not a built in way to link the "axes cross at" parameter with a cell. It should be acheivable using VBA if you are prepared to go there. If you are relatively unfamiliar with VBA, start by recording a macro while you manually change the "axes cross at" parameters. That should give you a basic structure to work from for writing the procedure (which you may want associated with the change and/or calculate event so it occurs automatically).

    Another option, especially if you are inexperienced with VBA, might be to create "dummy" axes. In an out of the way place in your spreadsheet, use your averages to create a couple of data series that you can plot as a "crosshair" on your scatter plot. Then you can hide the actual axes.

  5. #5
    Registered User
    Join Date
    10-01-2012
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    8

    Re: Can you OffSet the X Y Center axis of a scatter Chart?

    Mr Shorty, Many Thanks that worked. You rock!!!

    I was able to record a new macro and pull the code from manually setting the new Cross Axis.

    Thank you

    WhyWhy

    With ActiveChart.Axes(xlCategory)
    .MinimumScale = -130.789054757829
    .MaximumScale = 130.789054757829
    .MinorUnitIsAuto = True
    .MajorUnitIsAuto = True
    .Crosses = xlCustom
    .CrossesAt = Range("B5")
    .ReversePlotOrder = False
    .ScaleType = xlLinear
    .DisplayUnit = xlNone
    End With

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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