+ Reply to Thread
Results 1 to 4 of 4

Need help creating a graph that can automatically keep the x & y axis in the same scale

  1. #1
    Registered User
    Join Date
    12-04-2013
    Location
    Kuala Lumpur
    MS-Off Ver
    Excel 2007
    Posts
    6

    Need help creating a graph that can automatically keep the x & y axis in the same scale

    So i am trying to plot geographical data, and as such i need the x and y axis to be of the exact same scale. Furthermore, the area of the graph may change with each use, as i plot different sized areas of land. I managed to find this code (below) which looks like it should work, however im not really sure how to use it in this application. When i assign it to a graph either nothing happens, or i get an error saying that the .PlotArea has not been set. I'm no good at VBA haha, so just hoping someone could explain how i should integrate this into my graph.

    Cheers,
    Chris

    Please Login or Register  to view this content.

  2. #2
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Need help creating a graph that can automatically keep the x & y axis in the same scal

    From that chunk of code, seems like you only need:
    Please Login or Register  to view this content.
    Amend and add to your existing code that creates the chart?

  3. #3
    Registered User
    Join Date
    12-04-2013
    Location
    Kuala Lumpur
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Need help creating a graph that can automatically keep the x & y axis in the same scal

    Thanks for the reply. This is part of my problem- the chart itself is not part of a macro, or created by one. It's a fixed object on the sheet if tat makes sense. I just need it to automatically scale as i input data (as standard graphs usually do) but keep the x/y axis ratio even at 1:1. However, i have no idea how to attribute VBA code to the graph to achieve this..

  4. #4
    Forum Expert millz's Avatar
    Join Date
    08-14-2013
    Location
    Singapore
    MS-Off Ver
    Excel, Access 2016
    Posts
    1,694

    Re: Need help creating a graph that can automatically keep the x & y axis in the same scal

    Please post a sample workbook (with all sensitive data removed), showing where is the data being input, and with that chart.

    Also, by what you described, do you also mean that the chart's source data should dynamically change as well?

  5. #5
    Registered User
    Join Date
    12-04-2013
    Location
    Kuala Lumpur
    MS-Off Ver
    Excel 2007
    Posts
    6

    Re: Need help creating a graph that can automatically keep the x & y axis in the same scal

    Well if a dynamic table is what i think it is, then i don't think it's necessary as i have found a way around it (not a very nice way but it works). On that sheet, you can see that the graph picks up two sets of data using x1,y1 points and x2,y2 points


    Attachment 282988

+ 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. Scale part of Vertical Axis on a Graph?
    By flindy87 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 07-11-2013, 05:33 AM
  2. Change x axis scale mid graph on timeline
    By natedawg400 in forum Excel Charting & Pivots
    Replies: 1
    Last Post: 12-22-2011, 08:54 AM
  3. How to display Y axis scale on both ends of the graph??
    By chmura in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 09-24-2009, 02:33 AM
  4. graph format axis scale
    By bbirch in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-04-2009, 11:35 AM
  5. [SOLVED] how do i change the x-axis of a graph to a log scale?
    By anne in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 04-13-2006, 02:35 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