+ Reply to Thread
Results 1 to 10 of 10

Graphing Linear Inequalities in Two Variables using Excel 2010

  1. #1
    Registered User
    Join Date
    09-04-2012
    Location
    building
    MS-Off Ver
    Excel 2010
    Posts
    5

    Graphing Linear Inequalities in Two Variables using Excel 2010

    Hello all,

    I'm working on an assignment where I need to graph linear inequalities in two variables. So far I've formatted the graph to my liking except for the line and shaded area. Two questions and a picture of where I'm at so far below for better understanding.

    - How do I make the line continue across the entire grid while keeping the x and y intercept data points intact?
    - Once the line is stretched across the grid how do I "shade" one side of the line to show the solution?

    Thanks for any help you can give.

    Here's what I have so far...
    Capture.JPG

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

    Re: Graphing Linear Inequalities in Two Variables using Excel 2010

    include 2 points in your xy data that are beyond the scale. You should then get the line but no end data markers.

    Use Area chart to shade below the line. Plot the series on the secondary axis. I have left the secondary axis gray so you can see it.
    Attached Files Attached Files
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    09-04-2012
    Location
    building
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Graphing Linear Inequalities in Two Variables using Excel 2010

    Thank you Andy.

    I've managed to extend the line to reach both sides of the grid. But I can't seem to figure out how to shade the one side using Area chart. When I select data and choose an area chart it just creates a separate chart all together. =/

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

    Re: Graphing Linear Inequalities in Two Variables using Excel 2010

    Start with you xy-scatter with one data series.
    Use the select data dialog to add another data series. Don't worry about assigning data ranges yet.

    Select the new data series on the chart and change it to the Secondary axis.
    Now change the chart type of that individual series.
    You can now go back to the select data dialog and assign the ranges to that series.
    Finally you can format the secondary x and y axes.

  5. #5
    Registered User
    Join Date
    09-04-2012
    Location
    building
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Graphing Linear Inequalities in Two Variables using Excel 2010

    Think I'm almost there Andy,

    Ive created another data series within the "select data source" dialog box. I edited nothing only choosing to "add" another series. I hit okay and red dot is now shown on (1,1).

    I then right click on this data series and choose "format data series" and select "secondary axis" under Series Options. Red dot moves up somewhere in (1,3.3?).

    I then right click on this series again and choose "change series chart type". I select "area" chart and the series disappears.

    Am I following the steps correctly at this point? At this point I go back to "select data source" dialog box and I'm lost =/.

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

    Re: Graphing Linear Inequalities in Two Variables using Excel 2010

    go back to "select data source" and select the new series.
    Edit it and set the Values to the correct range. Edit the Category range as well.

  7. #7
    Registered User
    Join Date
    09-04-2012
    Location
    building
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Graphing Linear Inequalities in Two Variables using Excel 2010

    Thanks for the help Andy,

    I just can't seem to select the right ranges in order to make it "fit" against the dotted line. I think I might just use some image editing software to created the "shade" =).

    At least I have the line extended out and have a better understanding of how to use different data source series. Thanks for the help Andy. I truly do appreciate it.

  8. #8
    Registered User
    Join Date
    09-04-2012
    Location
    building
    MS-Off Ver
    Excel 2010
    Posts
    5

    Re: Graphing Linear Inequalities in Two Variables using Excel 2010

    I found the easiest method and wanted to post it in case anyone stumbles upon this thread in search of the same thing as me.

    Within excel go to Insert tab, insert shape (four sided), once shape is inserted click shape fill and change the transparency so you can see your graph underneath it. Then select the edit shape button on the ribbon toolbar and select edit points. Now you can fit the shape to the one side of your graph perfectly. Use a triangle shape if the part you need shaded is on the other side. Good luck.
    Attached Images Attached Images
    Last edited by z0t9; 09-11-2012 at 09:33 AM.

  9. #9
    Registered User
    Join Date
    10-25-2018
    Location
    Wrexham
    MS-Off Ver
    Office 365
    Posts
    2

    Re: Graphing Linear Inequalities in Two Variables using Excel 2010

    Quote Originally Posted by Andy Pope View Post
    include 2 points in your xy data that are beyond the scale. You should then get the line but no end data markers.

    Use Area chart to shade below the line. Plot the series on the secondary axis. I have left the secondary axis gray so you can see it.


    How would I calculate linear inequalities if I have 21 rather than two variables! I also need to calculate the weightings used to create a particularly complex data set.

  10. #10
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,470

    Re: Graphing Linear Inequalities in Two Variables using Excel 2010

    Welcome to the forum!

    Unfortunately your post does not comply with Rule 4 of our Forum RULES. Do not post a new help request in an existing thread. (B)

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in the new thread that you must start.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

+ 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