CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Nov 2010
    Posts
    4

    Easy way to plot and display arrays?

    Hello:

    First post here. Using C in Visual Studio 2008. Can work with VS 2005 if necessary.

    1. How do I display numerical data in arrays as in a spreadsheet?
    2. How do I plot numerical data in arrays?

    These seem to be simple questions. But I cannot find solutions. So far, I would print the data to a file, import into Excel and view/plot. However, with this code there are too many arrays--so the print/import/plot is tiring.
    Some constraints.
    1. I do not want to write 20+ lines of code to do the above. MATFOR or Array Visualizer let you do the plotting with a one line function call.
    2. They cannot display the data in a convenient format. I would like to display the data and the plot in one or two windows so that they are visible simultaneously.
    3. This is a win32 console application---all the code is portable.
    4. Will be using these during debugging.
    5. Free or paid.

    I am also open to a solution that outputs the array data to an Excel sheet (can keep Excel open) and if it can also plot that can be great but I can live without plotting.

    Best

  2. #2
    Join Date
    Aug 2010
    Posts
    47

    Re: Easy way to plot and display arrays?

    I'm not sure if this is good enough, but have you tried using a memory window?

    http://msdn.microsoft.com/en-us/libr...8VS.80%29.aspx

    Basically go: Debug->Windows->Memory->Memory 1

    Then paste a pointer into the address bar, and right click on the window to see some display options.

    Does that help?

  3. #3
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: Easy way to plot and display arrays?

    OpenCV comes with some drawing tools and the highgui library to easily create a window and display the plot. You might be able to put something together with that, but it will take at least 20 lines of code.

  4. #4
    Join Date
    Nov 2010
    Posts
    4

    Re: Easy way to plot and display arrays?

    Ankheg, Lindley: Thanks for your suggestions. But they will not serve my purpose.

    I need something that will output arrays and a plot; both visible simultaneously--without too much work---defined as a couple of lines of code.

  5. #5
    Join Date
    Nov 2010
    Posts
    4

    Re: Easy way to plot and display arrays?

    Think of a spreadsheet with columns of data and a plot next to it.
    That's what I am looking for but without having to go thru the print, import into excel, plot cycle a few hundred times!!

  6. #6
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: Easy way to plot and display arrays?

    Well, a quick Google brings up this possibility:
    http://www.advsofteng.com/cdcpp.html

    What you're asking for is extremely specific, though, and I have my doubts that you'll find exactly what you want without some code effort.

  7. #7
    Join Date
    Nov 2010
    Posts
    4

    Re: Easy way to plot and display arrays?

    Lindley:

    While I am looking for something specific, the requirements are the same for any one doing numerical work with arrays and matrices--displaying data and plot simultaneously.
    I am hoping that a such a tool has been written and is available.

    Best

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured