Plotting contour graphs in C/C++

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jastrebok
    New Member
    • Jan 2012
    • 3

    Plotting contour graphs in C/C++

    Hello everybody,
    I'm new here and I'm also quite new to programming but I need your advice on the subject of plotting my C outputs. In Matlab, there is a plotting function "contour". It has a great advantage. You give it a data matrix (each cell has one dedicated number)and it draws contour curves "between the cells" and makes nice smooth curves. I need it for plotting of error distribution in multilateration .

    Do you have tips for the best library or external utility that could do it? (mainly MS Windows)

    Thanks in advance for your response :)

    Petr
  • lspxy
    New Member
    • Nov 2011
    • 12

    #2
    you could get the subject of the function "contour" in matlab.

    then, modify it.

    Comment

    • jastrebok
      New Member
      • Jan 2012
      • 3

      #3
      I'm not very experienced with graphic functions. Are there also other posibilities? I mean something like using some freeware utilities?

      Comment

      • donbock
        Recognized Expert Top Contributor
        • Mar 2008
        • 2427

        #4
        I'm a little confused. Is this contour being computed by a C or Matlab program?

        Assuming you are using a C program to compute the coordinates of the contour ... you have a basic decision to make: either add graph-drawing capability to your program or export your data to a program you already have that is already good at drawing graphs. Have you considered emitting a comma-separated-values (CSV) file and then opening that file with Excel? Does Matlab import data?

        Comment

        • jastrebok
          New Member
          • Jan 2012
          • 3

          #5
          I'm writing in C. I need to draw that data. Graph-drawing capability would be great but you've inspired me to use .csv as a "first" step. Just one question. Is there anything like contour in Excel?

          Comment

          • donbock
            Recognized Expert Top Contributor
            • Mar 2008
            • 2427

            #6
            Excel help tells me that my version (Excel 2010) supports 4 kinds of Surface Charts: 3-D surface, Wireframe 3-D surface, Contour, and Wireframe contour. Your version may vary. I don't know if any of these look like contour plots in Matlab.

            Comment

            Working...