+ Reply to Thread
Results 1 to 6 of 6

Sliding scale graph or graph with only X axis?

  1. #1
    Registered User
    Join Date
    03-26-2019
    Location
    Winnipeg, Canada
    MS-Off Ver
    2016
    Posts
    3

    Unhappy Sliding scale graph or graph with only X axis?

    Hello all,

    I have a cell calculating the average of a range of cells which results in a value between -2 and +2 that I want to visually represent as in the picture below but cannot, for the life of me, figure out how to do so. Help?

    Sliding Scale.png

    As an adjunct question (or maybe a concession which would also be helpful), can anyone explain to me how to use a formula to convert this number to a percentage of the same range? Ie., -2 = 0% and +2 = 100%, so a score of -0.113 would equal 47.2%.

    Many thanks for your expertise.

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

    Re: Sliding scale graph or graph with only X axis?

    It seems like it should be as easy as creating an XY scatter chart -- but deleting/hiding/removing the Y axis. Here's how I created this:

    1) In A1 enter my number that ranges from -2 to 2. In B1 I enter 0.
    2) Insert scatter chart and fix up the data series definitions (I usually use the select data dialog) so that B1 is the Y values for the only data series and A1 is the X values.
    3) Delete or hide the y axis.
    4) Format the X axis to have a thick line with a gradient color scheme and with fixed min at -2 and fixed max at +2.
    5) Format the data series to have a suitable marker.

    That should be close to what you want.

    As for the other question -- isn't that simple linear interpolation? (y-0)/(-0.113-(-2))=(1-0)/(2-(-2)) solve for y?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Registered User
    Join Date
    03-26-2019
    Location
    Winnipeg, Canada
    MS-Off Ver
    2016
    Posts
    3

    Re: Sliding scale graph or graph with only X axis?

    Quote Originally Posted by MrShorty View Post
    It seems like it should be as easy as creating an XY scatter chart -- but deleting/hiding/removing the Y axis. Here's how I created this:

    1) In A1 enter my number that ranges from -2 to 2. In B1 I enter 0.
    2) Insert scatter chart and fix up the data series definitions (I usually use the select data dialog) so that B1 is the Y values for the only data series and A1 is the X values.
    3) Delete or hide the y axis.
    4) Format the X axis to have a thick line with a gradient color scheme and with fixed min at -2 and fixed max at +2.
    5) Format the data series to have a suitable marker.

    That should be close to what you want.
    Incredibly helpful, thank you!

    Quote Originally Posted by MrShorty View Post
    As for the other question -- isn't that simple linear interpolation? (y-0)/(-0.113-(-2))=(1-0)/(2-(-2)) solve for y?
    This one was less clear to me. Can you tell me exactly what I should enter into the formula bar? Entering the formula as you wrote it =(1-0)/(A1-(-2)) where A1 is my -0.113 cell resulted in 0.3636 which is not the correct answer. Forgive me, I'm better than you average bear at Excel, but math on the other hand...

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

    Re: Sliding scale graph or graph with only X axis?

    Solving the linear interpolation equation is a common application of solving proportions or rational equations that you would have learned back in early secondary algebra. I believe there is value in reviewing those math principles you should already know:
    https://www.purplemath.com/modules/ratio2.htm
    https://www.purplemath.com/modules/solvrtnl.htm

    (y-0)/(-0.113-(-2))=(1-0)/(2-(-2)) multiply by (-0.113-(-2)) to get y alone
    y=1*(-0.113-(-2))/(2-(-2)) -- and there you go. If you have 1 in A1, -0.113 in say A2, -2 in A3, and 2 in A4, then your linear interpolation formula become =A1*(A2-A3)/(A4-A3)

  5. #5
    Registered User
    Join Date
    03-26-2019
    Location
    Winnipeg, Canada
    MS-Off Ver
    2016
    Posts
    3

    Re: Sliding scale graph or graph with only X axis?

    Quote Originally Posted by MrShorty View Post
    Solving the linear interpolation equation is a common application of solving proportions or rational equations that you would have learned back in early secondary algebra. I believe there is value in reviewing those math principles you should already know:

    (y-0)/(-0.113-(-2))=(1-0)/(2-(-2)) multiply by (-0.113-(-2)) to get y alone
    y=1*(-0.113-(-2))/(2-(-2)) -- and there you go. If you have 1 in A1, -0.113 in say A2, -2 in A3, and 2 in A4, then your linear interpolation formula become =A1*(A2-A3)/(A4-A3)
    Well the little lecture about how I should spend my time or what I should know was completely useless but the rest was helpful, thanks.

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

    Re: Sliding scale graph or graph with only X axis?

    You could use the TREND function

    =TREND({0;1},{-2;2},-0.113)
    Cheers
    Andy
    www.andypope.info

+ 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. X axis scale and multiple graph sizes
    By tashlana1 in forum Excel Charting & Pivots
    Replies: 3
    Last Post: 05-01-2016, 02:42 PM
  2. Help with x-axis scale on graph
    By t.r24 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 02-17-2015, 08:52 AM
  3. Need help creating a graph that can automatically keep the x & y axis in the same scale
    By chris.excel in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-10-2013, 04:00 AM
  4. 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
  5. 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
  6. graph format axis scale
    By bbirch in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-04-2009, 11:35 AM
  7. [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

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