+ Reply to Thread
Results 1 to 3 of 3

How to change or standardize size and position of plot areas

  1. #1
    Registered User
    Join Date
    06-16-2013
    Location
    United States
    MS-Off Ver
    Office 365
    Posts
    5

    How to change or standardize size and position of plot areas

    It's frustrating that you can't easily change the size and position of the plot area in Excel. I've read in some places that you can accomplish this with macro (of which I have no knowledge), so I'm posting here for some help on how to do so.

    I have several scatter plots in Excel whose total chart areas are defined (2.6" tall by 3.3" wide). Within that chart area, I would like to maximize the plot area and make it the same for all graphs. I originally started from the same graph, copied and pasted, removed the old data and added the new data (by special pasting formulas only) whilst changing the axes bounds appropriately. This works pretty well, but when changing the axis bounds, it seems to change the plot area ever so slightly. Also, some axes have units with more digits than others, so the numbers are touching the y-axis label, so I'd like to resize the plot areas to make them narrower, leaving the right edge of the plot stationary and only moving the left.

    Any ideas on how to accomplish this? Also, is there a way to define axis bounds to be different from the actual axis units displayed. For example, have an x-axis bounded from -5 to 105, but have it labeled from 0 to 100?
    Last edited by tensor9; 06-16-2013 at 04:23 PM.

  2. #2
    Forum Contributor
    Join Date
    10-18-2012
    Location
    Telford, England
    MS-Off Ver
    Excel 2010 (2003)
    Posts
    294

    Re: How to change or standardize size and position of plot areas

    Final paragraph; Google xy labeller tool; that will do what you need.

    As to plots, good luck. I've only sized whole charts so far. But a hint; charts are sized as a Shape object (and unfortunately I believe there is no 'activeshape' object so things are tricky.

  3. #3
    Forum Contributor
    Join Date
    10-18-2012
    Location
    Telford, England
    MS-Off Ver
    Excel 2010 (2003)
    Posts
    294

    Re: How to change or standardize size and position of plot areas

    I took a quick look using the old record what you want done and see in the VBA can be fixed to do exactly what you want. I adjusted a plot area and got this:


    Please Login or Register  to view this content.
    So you can adjust plot area in VBA. And I'll be doing so myself when I get some more time.

    I align my charts (ivba) and plot areas (manuall for now) to row and column boundaries. This allows transparent chart and plot areas to have cell interior colours show through (and other stuff).
    To do alignment this way you need to know that rows ahve .height and .top properties; columns have .width and .left. Find the rows and columns by tedious but simple code and Bob's your uncle.
    Last edited by brynbaker; 06-17-2013 at 07:00 AM. Reason: correction

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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