Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Following this question.

How can I command gnuplot to draw this plot:

alt text

(from the bottommost example on this page).

I guess I need to do something similar to what is being done here. But what exactly?

Eventually I want to build a simple waveform viewer, that will get the binary data for several signals and will draw all of them one above the other, just like the example. Maybe you know a script or a tool that already does it ?

share|improve this question
    
I think it would have been more in spirit of this site if you had edited your old question with data from this one, but whatever. I certainly hope someone will be able to answer this. –  AndrejaKo Jul 15 '10 at 9:07

2 Answers 2

up vote 1 down vote accepted

much as I value gnuplot, may I suggest ploticus at http://ploticus.sourceforge.net ?

have a look at the gallery: http://ploticus.sourceforge.net/gallery/index.html

edit: I kinda ignored that fact that you want to build something, and therefore need a C++ example or such. Have a look at audacity: http://audacity.sourceforge.net/

The track display code - displaying tracks above each other - might just be what you are looking for.

share|improve this answer



Not sure if this response will be of relevance anymore but since I wasn't able to find the answer elsewhere I thought I should share this with anyone else who may be stumbling across this page:

You can use the data style "steps" to achieve what you would like. The step style maintains your data value until the next sample.

You will have two ways of setting this style. Either

  1. As default for all plots using the following command before using the plot command

    set style data steps

  2. On individual traces like

    plot 'data_ks.dat' using 1:4 title columnhead, '' using 1:($5+2) title columnhead, '' >using 1:($6+4) title columnhead with steps

In the example in the second solution I have added a value to some of the datastreams to offset them on the y-axis. You can off course also add the individual datastreams to their separate plot using the multiplot command.
The title for each block is assumed to be present in row 1 of your datafile.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.