+ Reply to Thread
Results 1 to 6 of 6

Help charting peak values when the X-axis values are not the same

  1. #1
    Registered User
    Join Date
    11-20-2009
    Location
    W. OR
    MS-Off Ver
    Excel 2003
    Posts
    3

    Unhappy Help charting peak values when the X-axis values are not the same

    Hi all,

    This is my first post on this forum. I've been using Excel 2003 for the past few years and I have been stumped on this problem for the past couple of years.

    I have a spreadsheet I made for a vehicle application -- you enter dynamometer measurement information in RPM and torque, then the gear ratios, vehicle weight, tire size, etc and it will generate a series of scatter plots showing the full-throttle acceleration available through the vehicle speed range (basically translates the RPM domain to the MPH domain) as well as a few other things. I've spent a lot of time making it complete and nice looking.

    The end result is a graph like the one titled "erics" that I attached. The one titled "c160" is another graph generated that compares two different motors with different transmission ratios.

    The wheel torque (proportional to acceleration) is plotted in one line for each gear ratio.

    I want to make a one-line plot of just the PEAK values -- in other words, I want it to plot 1st gear until the 1st gear line crosses the 2nd gear line (indicating that 2nd gear now produces more torque than first because the engine's power is dropping off) and then I want it to plot the 2nd gear line until that crosses the third gear line, etc.

    I've been trying to figure out ways to do this literally for years. The problem as far as I can tell is that the X-axis indices are not constant -- the MPH values associated with each torque or acceleration value are not the same from gear to gear.

    In college they never taught us Excel (we were taught Matlab, but I wanted this sheet to be usable by anyone) so i don't know much about macros and VBA and what not. If anyone can suggest something, please do -- even if you just know the proper tool to solve the problem, just let me know what it is and I'll take it from there. Any help is appreciated! Thanks!!
    -Ben

    PS: Sure is a hassle taking pictures out of Excel graphs, I end up saving it as an html document and stealing the linked gif images that are generated.
    Attached Images Attached Images

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

    Re: Help charting peak values when the X-axis values are not the same

    Not sure I fully understand your requirement but this may help.
    http://www.andypope.info/charts/intersection.htm

    It uses a user defined function, which required VBA, to calculate the points where 1 line crosses another.

    And this addin will made future exports of images easy
    http://www.andypope.info/vba/gex.htm
    Cheers
    Andy
    www.andypope.info

  3. #3
    p45cal
    Guest

    Re: Help charting peak values when the X-axis values are not the same

    It's not peak values you want, it's max values at a given speed.
    This would probably be easier manipulating data rather than trying to get data from charts.
    You must already have a data series for each gear. It's a question of either lining up the data so that the speeds all line up and choosing the max value from each row, or doing the equivalent in vba.
    (I know you say "the MPH values associated with each torque or acceleration value are not the same from gear to gear", but you have managed to convert them somehow.)

    Show us some data.
    Last edited by p45cal; 11-21-2009 at 08:18 AM.

  4. #4
    Registered User
    Join Date
    11-20-2009
    Location
    W. OR
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Help charting peak values when the X-axis values are not the same

    Thanks for the replies.

    I think the intersection function will work.

    I've attached a filled-out example spreadsheet. For clarification, if you look at one of the graphs titled "wheel torque" I'm basically trying to generate one line to include all the peak values at any given speed. I'm going to try the intersection function once I get some time over the holiday weekend. I don't think manipulating the data is a good solution, I'm a newbie to VBA but it sounds like it would be a huge hassle. I've tried working it out a couple of times and couldn't find a way to do it.

    I made the spreadsheet several years ago but I got bored recently and decided to build a new version of it to require fewer operator changes to do what it is already doing. This brings me to another question: when plotting a data series on a scatter plot, how do I get it to not plot any value that is not entered? Currently the spreadsheet takes one set of values and plots it and then derives a second set of values as a function of the first and plots that one too. But the number of values in the input set varies, and the plot charts a set range of cells that, if the cells they take their data from are not filled in, show up as zeros in the graph.

    For example, if you pull the formula down in the "Power" column of the first two sheets, look at the "Dyno" graph for the corresponding engine -- the red line will go to zero and look sloppy. I have to manually erase every cell that does not have a corresponding input (torque) value, even though I've used an IF statement to cause its output to be "" when there is no input value. I'm trying to make this as easy as input (torque values, gear ratios, tire dia., vehicle mass, redline) and output (graphs formatted correctly without any data formatting or manipulation) because I want it to be usable by others who are not excel nerds like me. :p

    Sorry if that sounds confusing... I can clarify if needed... and thanks again for the help!!

    Ben

  5. #5
    p45cal
    Guest

    Re: Help charting peak values when the X-axis values are not the same

    Quote Originally Posted by bcol View Post
    I've attached a filled-out example spreadsheet.
    Ben
    Have you?
    (now it tells me the message is too short to post, hope this sentence will sort that)

  6. #6
    Registered User
    Join Date
    11-20-2009
    Location
    W. OR
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Help charting peak values when the X-axis values are not the same

    Wow, that's strange, hopefully it will work this time. Sorry and thanks for your patience. :p
    Attached Files Attached Files

+ 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