+ Reply to Thread
Results 1 to 13 of 13

Is aspect ratio possible in an XY scatter

  1. #1
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Is aspect ratio possible in an XY scatter

    Heya,
    Thanks to a tip from Andy Pope, I've made some pretty good head-way on a design-plan-mapping XY scatter plot. My question now is -

    Is there a way to maintain aspect ratio through changing dimensions?

    Ideally, I'd like to have the chart stay the same size, and assign dimensions accordingly on a 1 - 1 ratio from x to y. Being a plan for a fixed size of products, if it's say, 10' x 100', it should be a long narrow plan, not a x = y size chart, which portrays very distorted dimensions, IE 2' one way = 20' the other. If it's 10 x 10, or even 100 x 100, it looks great, but differences between the lengths and widths are returning wonky aspect ratios.

    I'm using VBA through a command button, so if code is required, I can input it there so that it resizes on calculation. The length and width are plainly listed within my sheet.

    If it's a simple format option that I can't find, well, I'm an idiot.

    mew!
    Last edited by mewingkitty; 03-05-2009 at 04:33 PM.
    =IF(AND(OR(BLONDE,BRUNETTE,REDHEAD),OR(MY PLACE,HER PLACE),ME),BOW-CHICKA-BOW-WOW,ANOTHER NIGHT ON THE INTERNET)

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: Is aspect ratio possible in an XY scatter

    If you set both the axes to be min=0 and max=100 would your calculated values no appear correct?
    Cheers
    Andy
    www.andypope.info

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Is aspect ratio possible in an XY scatter

    Maybe this, Mew?
    Please Login or Register  to view this content.
    Entia non sunt multiplicanda sine necessitate

  4. #4
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Re: Is aspect ratio possible in an XY scatter

    Thanks for the replies -

    Andy - I don't know how to set the mins and max's, if I did, I'd set them both to the highest number between length and width, which is, essentially, all I need to do. min will always = 0 for both, if I could set max for both axes to the larger of the two between length and width, I'd be good to go.

    SHG - I can't get that code to budge, either in my workbook, or in a fresh one. Although I'm progressing decently well with VBA, there are still some major rules of thumb I know I'm not familiar with.

    Attached is my happy little project thus far.

    Thanks by the way, to both of you. This is almost fully functional, and couldn't have done it without the help I've received over the last year from you two, and many others on here.

    Oh, almost forgot, you'd enter the length and width, then click ye' ol' button. It figures out your product counts, and maps out the design from there. Only the cells which are tinted dark grey are unlocked in the regular version.

    mew!
    Last edited by mewingkitty; 03-13-2009 at 06:45 PM.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Is aspect ratio possible in an XY scatter

    Mew,

    See if the attached does what you want.
    Attached Files Attached Files

  6. #6
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Re: Is aspect ratio possible in an XY scatter

    Dude,
    You are the ossim.
    Attached a command at the end of my code to run that macro, rather than bumbling with it now. I'll be taking this home to study your doings. Works perfectly.

    Thanks to both of you, couldn't have got started without Andy, and woulda been dead in the water trying to figure that out without SHG.

    mew!

  7. #7
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Is aspect ratio possible in an XY scatter

    Mew,

    When you look at this, change some formulas on Sheet1:

    A12: =MIN($A$17:$F$1000 (A:A,C:C,E:E ))

    A13: =MAX($A$17:$F$1000 (A:A,C:C,E:E ))

    B12: =MIN($A$17:$F$1000 (B:B,D:D,F:F ))

    B13: =MAX($A$17:$F$1000 (B:B,D:D,F:F ))

  8. #8
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Re: Is aspect ratio possible in an XY scatter

    k, will do, and one last thing...

    Protecting page two doesn't allow the macro you gave me to work. I am once again chart-retarded, and don't know how to allow it to change the values while protected.

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Is aspect ratio possible in an XY scatter

    Protect the sheet (not Unprotect it) in code with the UserInterfaceOnly option set to True.

    BTW, I'm so disappointed in you, Mew. Until you changed the location your profile, I thought you were from Grand Prairie, Texas.

  10. #10
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Re: Is aspect ratio possible in an XY scatter

    I love to disappoint, just ask the ladies.



    Please Login or Register  to view this content.
    still gets me a method failed on :

    Please Login or Register  to view this content.
    which is, as you know, the first line attempting to change the chart.

    It does indeed successfully protect the sheet with no pass required, which is fine (not worried about people intentionally messing with the code, more concerned about unintentional typing/clicking/etc.), but still hinders your ossim macro.

  11. #11
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Re: Is aspect ratio possible in an XY scatter

    Or should I unprotect at the beginning, and re-protect at the end? That should work, no?

    Apparently not...
    Not sure how I'm managing to protect it with the unprotect command, but I seem to be finding a way.

    mrrrrrrrrrrrrrrrrrrrow!
    Last edited by mewingkitty; 03-05-2009 at 08:39 PM.

  12. #12
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Is aspect ratio possible in an XY scatter

    Did you change the chart axes? Your original plot didn't have them, and I put them back -- it needed them in order to set the scale.

  13. #13
    Forum Contributor mewingkitty's Avatar
    Join Date
    09-29-2008
    Location
    Fort McMurray, Alberta, Canada
    MS-Off Ver
    Excel 2003
    Posts
    949

    Re: Is aspect ratio possible in an XY scatter

    Still can't get it to run with the userinterfaceonly in place, but

    activesheet.unprotect

    and off I go.

    Thanks again.

    Oh, and by the way, my Grande Prairie is a lot colder than your Grande Prairie :P

+ 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