Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Plotting contour diagrams? how do i do that?

  1. Mar 2, 2008 #1
    im learning about contour diagrams in my calculus text but im totally confused as to how one should start drawing those plots?

    for example f(x,y) = x+y
    then its supposed to go like

    x+y = c
    y = -x +c

    ^^i can see that the slope is 1
    but how do i plot this graph?..im told that i should give values to c and plot it...but im totally confused as to how i should do that (the answer is there too but i donno how they drew the graph/which method they used to draw it)

    also im totally confused as to how one can draw a contour diagram from the data given in a table

    table of values for f(x,y) = X^2 - Y^2

    i have attached the table here too

    thank you

    Attached Files:

  2. jcsd
  3. Mar 2, 2008 #2
    Connect the dots.
  4. Mar 2, 2008 #3
    well..my main issue is how to find each seperate contour line?

    if i were to draw one line which dots/values should i use

  5. Mar 2, 2008 #4
    Well, your curves are easy. Your first example is a straight line so you can use slope and intercept. Your second example looks like a hyperbolic functions so you could find the asymptotes and the point where it crosses the axis.

    In general though it is not much different then plotting any function. Pick some x values, find the corresponding y values and plot. If you can find roots, asymptotes and extreme values that can reduce the number of points you need to find. You could use a graphing calculator if you are having trouble.
  6. Mar 3, 2008 #5
    Here is one procedure to find approximate dots from values in a table: Look along
    each row and each column in the table to find the "box" through which the contour
    might pass. Then do a linear interpolation to find the coordinates. Then connect the dots.

    For example, suppose you look for the contour -1 in your table. Looking along the first
    row in your table, this contour would have approximate dots at the
    coordinates (-2.8, 3.0) and (2.8,3.0). Now do this for every row and
    every column, collect the dots and connect them.

    Now, write a computer programme to do this automatically and you will see that it is not as easy as the above instructions seem!
  7. Mar 3, 2008 #6


    User Avatar
    Staff Emeritus
    Science Advisor

    I would hope that you could see the slope was -1!

    Surely, if you are looking at functions of more than 1 variable, you learned long ago that the graph of y= -x+ c is a straight line! You only need two points to determine a straight line. when x= 0, y= c and when y= 0, x= c. Draw the straight line through the intercepts (0, c) and (c, 0). Do that for several different values of c.

    Why make a table? That's what you do with functions you've never seen before! That's what a calculator does! You are supposed to be smarter than a calculator.

    For any c, f(x,y)= c is x2- y2= c. You should recognise immediately that that is a hyperbola. If c is positive, the vertices are at [itex](\sqrt{c}, 0)[/itex] and [itex](-\sqrt{c},0)[/itex] and the asymptotes are the lines [itex]y= x+ \sqrt{c}[/itex] and [itex]y= -x+ \sqrt{c}[/itex]. If c is negative, the vertices are at [itex](0, \sqrt{c})[/itex] and [itex](0, -\sqrt{c})[/itex] and the same asymptotes as above. If c= 0, the asymptotes are the graph. It should take you about 3 minutes to draw several of those contours.
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?

Similar Discussions: Plotting contour diagrams? how do i do that?
  1. How do i do this? (Replies: 2)

  2. How do I graph this? (Replies: 3)