DSPRelated.com
Forums

which waveform viewer can be easily be integrated with c or c++?

Started by bharat pathak August 10, 2010
Hello,

    I have a requirement, wherein my dsp datapath algorithms are
    in C or C++. The input and output data is stored in memory
    buffers. Now staying in C environment I want to see the plots
    of the waveforms. So which waveform viewer could easily be 
    integrated in C/c++ environment. 

    1. once the figure window pops up, I should be able to zoom
       into the plot.

    2. multiple figure windows should be supported.

    3. subplot should also be supported.

    I am looking for matlab plot kind of capabilities but more
    from free and open source softwares.

Regards
Bharat
On 08/10/2010 06:31 PM, bharat pathak wrote:
> Hello, > > I have a requirement, wherein my dsp datapath algorithms are > in C or C++. The input and output data is stored in memory > buffers. Now staying in C environment I want to see the plots > of the waveforms. So which waveform viewer could easily be > integrated in C/c++ environment. > > 1. once the figure window pops up, I should be able to zoom > into the plot. > > 2. multiple figure windows should be supported. > > 3. subplot should also be supported. > > I am looking for matlab plot kind of capabilities but more > from free and open source softwares. > > Regards > Bharat
Check out Gnuplot. I know almost nothing about it, other than it is used by Octave and a few other Gnu-ish scientific applications. -- Tim Wescott Wescott Design Services http://www.wescottdesign.com Do you need to implement control loops in software? "Applied Control Theory for Embedded Systems" was written for you. See details at http://www.wescottdesign.com/actfes/actfes.html
On Tue, 10 Aug 2010 20:31:28 -0500, "bharat pathak"
<bharat@n_o_s_p_a_m.arithos.com> wrote:

>Hello, > > I have a requirement, wherein my dsp datapath algorithms are > in C or C++. The input and output data is stored in memory > buffers. Now staying in C environment I want to see the plots > of the waveforms. So which waveform viewer could easily be > integrated in C/c++ environment. > > 1. once the figure window pops up, I should be able to zoom > into the plot. > > 2. multiple figure windows should be supported. > > 3. subplot should also be supported. > > I am looking for matlab plot kind of capabilities but more > from free and open source softwares. > >Regards >Bharat
Gnuplot. Used by Octave to emulate matlab plotting functionality. -- Muzaffer Kal DSPIA INC. ASIC/FPGA Design Services http://www.dspia.com
>On Tue, 10 Aug 2010 20:31:28 -0500, "bharat pathak" ><bharat@n_o_s_p_a_m.arithos.com> wrote: > >>Hello, >> >> I have a requirement, wherein my dsp datapath algorithms are >> in C or C++. The input and output data is stored in memory >> buffers. Now staying in C environment I want to see the plots >> of the waveforms. So which waveform viewer could easily be >> integrated in C/c++ environment. >> >> 1. once the figure window pops up, I should be able to zoom >> into the plot. >> >> 2. multiple figure windows should be supported. >> >> 3. subplot should also be supported. >> >> I am looking for matlab plot kind of capabilities but more >> from free and open source softwares. >> >>Regards >>Bharat > >Gnuplot. Used by Octave to emulate matlab plotting functionality.
Gnuplot is an excellent choice, but don't be put off by some of the material you can find about it on the web. You could easily mistake it for a Mickey Mouse function drawing program from a lot of the descriptions you will find. Its actually a rather powerful plotting tool, with a lot of flexibility for massaging the appearance of the images it produces. Steve
steveu <steveu@n_o_s_p_a_m.coppice.org> wrote:

>Gnuplot is an excellent choice, but don't be put off by some of the >material you can find about it on the web. You could easily mistake it for >a Mickey Mouse function drawing program from a lot of the descriptions you >will find. Its actually a rather powerful plotting tool, with a lot of >flexibility for massaging the appearance of the images it produces.
I haven't used it, but I imagine it beats Excel, which I often use for plotting. (Excel has some advantages of its own, but I doubt they stack up.) Tangentially, I reserve the term "waveform viewer" for tools that can probe into an annotated simulation. I do not think Gnuplot can do that with C++, unless someone has gone to the effort of merging it with a symbolic debugger. Steve
On 11/08/10 05:27, Steve Pope wrote:
> steveu<steveu@n_o_s_p_a_m.coppice.org> wrote: > >> Gnuplot is an excellent choice, but don't be put off by some of the >> material you can find about it on the web. You could easily mistake it for >> a Mickey Mouse function drawing program from a lot of the descriptions you >> will find. Its actually a rather powerful plotting tool, with a lot of >> flexibility for massaging the appearance of the images it produces. > > I haven't used it, but I imagine it beats Excel, which I often > use for plotting. > > (Excel has some advantages of its own, but I doubt they stack up.) > > Tangentially, I reserve the term "waveform viewer" for tools that > can probe into an annotated simulation. I do not think Gnuplot > can do that with C++, unless someone has gone to the effort of > merging it with a symbolic debugger. > > Steve
Dislin is worth a look: : http://www.mps.mpg.de/dislin/
On 8/10/2010 8:31 PM, bharat pathak wrote:
> I have a requirement, wherein my dsp datapath algorithms are > in C or C++. The input and output data is stored in memory > buffers. Now staying in C environment I want to see the plots > of the waveforms. So which waveform viewer could easily be > integrated in C/c++ environment. > > 1. once the figure window pops up, I should be able to zoom > into the plot. > > 2. multiple figure windows should be supported. > > 3. subplot should also be supported. > > I am looking for matlab plot kind of capabilities but more > from free and open source softwares.
Hi Bharat, FWIW, I've looked for this sort of thing over the years and never have found anything that's suitable for my products, so I ended up rolling my own. It was a great deal of work, and evolved over a period of years. It's been beneficial, though, to get exactly what I want compared to making compromises with other solutions. ScopeDSP began many years ago using a "VBX" plotting control provided by Visual Basic, which could be accessed by C++. It was pretty good overall but it had an Achilles heal that it couldn't do bar plots with an arbitrary origin of the type typically used to display FFT results from an arbitrary base like -120 dB. That's when I started to write my own. That ended up being a good thing when Microsoft abandoned VBX controls a short time after hawking them as the next big thing. (.net is next. ;-) I've looked at gnuplot over the years, and it's very appealing in terms of being fairly easy to interface with via a pipe. It also has a lot of features. However, from a user's point of view, I always find its zooming to be a drag. I always feel like I'm slumming when I have to use it from Octave. (Not that Matlab's zooming is any better...) Ideally, this sort of thing would be available from wxWidgets, QT, or other similar cross-platform GUI toolkits. However, those don't seem to include a sophisticated plotting capability. Maybe they think that's out of their scope, or more likely, nobody has ever contributed something like that. So, I've thought of contributing my system, but since it's currently written in MFC, that would be a great deal of work. So it hasn't happened. Richard mentioned dislin; I think I've looked at that in the past but I can't remember why I didn't get too interested in it. I'll look at it again, though. You might also look at Python, which has something called "matplotlib" as an add-on. It's possible to mix C/C++ with Python. Or, you could maybe transliterate matplotlib into C/C++. That would probably be a lot of work, though. Overall, I'd think that gnuplot would be the easiest thing, if you don't mind slumming a little. :-) Grant -- _____________________________________________________________________ Grant R. Griffin Publisher of dspGuru http://www.dspguru.com Iowegian International Corporation http://www.iowegian.com See http://www.iowegian.com/img/contact.gif for e-mail address
Thank you Grant and All,

Regards
Bharat
Grant Griffin <nobody@example.com> writes:
> On 8/10/2010 8:31 PM, bharat pathak wrote: >> ... >> buffers. Now staying in C environment I want to see the plots >> of the waveforms. So which waveform viewer could easily be >> integrated in C/c++ environment. >> ... > ... > FWIW, I've looked for this sort of thing over the years and never have > found anything that's suitable for my products, so I ended up rolling
My experience too.
> ... > Ideally, this sort of thing would be available from wxWidgets, QT, or > other similar cross-platform GUI toolkits. However, those don't seem > to include a sophisticated plotting capability. ...
Did you look at GtkPlot from the GtkExtra widget set? (http://gtkextra.sourceforge.net/). IIRC there is also an OpenSource app that uses these widgets for scientific plotting. The GtkImageViewer widget (search engine) might also be of interest.
> Maybe they think > that's out of their scope, or more likely, nobody has ever contributed > something like that. So, I've thought of contributing my system, but > since it's currently written in MFC, that would be a great deal of > work. So it hasn't happened.
Well, there is a rule in Open Source: release early and release often. (Eric Raymond IIRC.) There might be people who are willing to spend the time porting to, say, GTk+ and other open librarys. Any way, there are so powerfull tools for softwaredevelopment today, that the biggest value of your app might be the ``design'': userinterface, concepts, algorithms. It might be a _big service_ to the community if you wrote a paper where you expose this; describing what is intended might be more interesting than what you implemented. Kind of blueprint. Obviously that's the info people who are software developers in the first place are looking for.
> > Richard mentioned dislin; I think I've looked at that in the past but > I can't remember why I didn't get too interested in it. I'll look at > it again, though. ...
I looked at it last time about a year ago: written in FORTRAN --- at least in the beginning --- and smells FORTRAN. I wrote my first programs in FORTRAN IV on punchcards, you know; I can't stand that crude approach to programming any longer. It's not only for the lack of data abstraction. It's also the monolithic approach. E.g. I did not see that DISLIN makes use of advanced rendering libraries such as Cairo or AGG as modern graphics libs like Gtk+ and friends do or can. -- hw
Heinrich Wolf wrote:
>Grant Griffin <nobody@example.com> writes: >> Maybe they think >> that's out of their scope, or more likely, nobody has ever contributed >> something like that. So, I've thought of contributing my system, but >> since it's currently written in MFC, that would be a great deal of >> work. So it hasn't happened. > >Well, there is a rule in Open Source: release early and release >often. (Eric Raymond IIRC.) There might be people who are willing to >spend the time porting to, say, GTk+ and other open librarys. Any >way, there are so powerfull tools for softwaredevelopment today, that >the biggest value of your app might be the ``design'': userinterface, >concepts, algorithms. It might be a _big service_ to the community if >you wrote a paper where you expose this; describing what is intended >might be more interesting than what you implemented. Kind of >blueprint. Obviously that's the info people who are software >developers in the first place are looking for.
And there ARE people who still use MFC. Even if you don't have time, some would probably still like to see it as-is. :) Michael