×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Square graph in excel?

Square graph in excel?

Square graph in excel?

(OP)
Hi,

Is there any way to force excel to draw the X and Y axes at the same scale?

RE: Square graph in excel?

thread770-141275

=====================================
Eng-tips forums: The best place on the web for engineering discussions.

RE: Square graph in excel?

Open a macro
Insert the following:
    Selection.Width = 450
    Selection.Height = 450

Select the chart
run the macro

TTFN



RE: Square graph in excel?

I assumed the original poster wanted a 1:1 aspect ratio. Can you clarify.  I don't think IRStuff's code will accomplish this.

=====================================
Eng-tips forums: The best place on the web for engineering discussions.

RE: Square graph in excel?

The default plot area is not square on the display.  The code basically stretches the plot area to be square on the display.  The actual values to be used will depend on your display resolution.

TTFN



RE: Square graph in excel?

But a square plot is not the same as a 1:1 aspect ratio between X and Y plot units.

For example if I plot y=x it would be 45 degree from horizontal with 1:1 aspect ratio.

But if X axis is 0-10 and Y axis is 0-100, then a plot of Y=X will be about 10 degrees from horizontal.

=====================================
Eng-tips forums: The best place on the web for engineering discussions.

RE: Square graph in excel?

Right-click on the axes, select "format axis" and set the scales to the same value.

------------------------------------------
     "...students of traffic are beginning to realize the false economy of mechanically controlled traffic, and hand work by trained officers will again prevail."

              Wm. Phelps Eno, ca. 1928

RE: Square graph in excel?

It looks like you'd need to use IRstuff's macro as well for that to work. Any other ideas?

------------------------------------------
     "...students of traffic are beginning to realize the false economy of mechanically controlled traffic, and hand work by trained officers will again prevail."

              Wm. Phelps Eno, ca. 1928

RE: Square graph in excel?

thread770-141275

=====================================
Eng-tips forums: The best place on the web for engineering discussions.

RE: Square graph in excel?

Manually you can quite obviously control whatever you want by manually resizing the chart area with the mouse and adjusting the graph axes.   One problem – every time you change the data beyond the bounds you will again have to manually adjust the graph axis.

There was a vba solution I posted in the linked thread 3 Dec 05 which met my needs very well (one execuation of the macro auto-scales and sets 1:1).  It was based on another posters information prior to that in the thread. Subsequent modification was made but I don’t know what it did.  

Also at the end of the thread, Yakpol had a suggestion for creating a phantom series that when autoscaled would accomplish the same thing.  I never tried it.

=====================================
Eng-tips forums: The best place on the web for engineering discussions.

RE: Square graph in excel?

(OP)
Thank you all!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources