#111 Steps with Blank Lines

closed
nobody
None
5
2011-04-26
2011-03-18
Douglas
No

Is it possible to plot a data set with blank lines using "with steps"? I have a set of data with blank lines, and each block has a unique value I am attempting to plot in a step function. I always get blank results, and my experiences with tables right now is infuriating!

Discussion

  • Ethan Merritt

    Ethan Merritt - 2011-03-18

    I can't answer that without seeing your plot command.
    Do you know about the "index" keyword?

     
  • Douglas

    Douglas - 2011-03-18

    Here's the command and some data...

    prevx = NaN
    prevy = NaN
    n=5
    plot '-' u ($2==1?(prevx=column(n),column(n)):prevx):($2==1?(prevy=$1,$1):prevy) w steps notitle

    # Frame | Index (x-sorted) | Real | Imag | Norm

    #Frame 0 of 150. Norm: 6.0263
    1 1 3.7267e-06 -3.7267e-06 6.0263
    1 2 5.9363e-05 5.9363e-05 6.0263
    1 3 0.00066903 -0.00066903 6.0263
    1 4 0.0053345 0.0053345 6.0263
    1 5 0.030093 -0.030093 6.0263
    1 6 0.12011 0.12011 6.0263
    1 7 0.33915 -0.33915 6.0263
    1 8 0.67755 0.67755 6.0263
    1 9 0.95767 -0.95767 6.0263
    1 10 0.95767 0.95767 6.0263
    1 11 0.67755 -0.67755 6.0263
    1 12 0.33915 0.33915 6.0263
    1 13 0.12011 -0.12011 6.0263
    1 14 0.030093 0.030093 6.0263
    1 15 0.0053345 -0.0053345 6.0263
    1 16 0.00066903 0.00066903 6.0263
    1 17 5.9363e-05 -5.9363e-05 6.0263
    1 18 3.7267e-06 3.7267e-06 6.0263

    #Frame 1 of 150. Norm: 2.7992
    2 1 0.014211 -0.0027978 2.7992
    2 2 -0.0041773 -0.02508 2.7992
    2 3 -0.0018535 0.049083 2.7992
    2 4 0.064514 -0.052935 2.7992
    2 5 -0.14192 0.019621 2.7992
    2 6 0.28268 0.053179 2.7992
    2 7 -0.406 -0.15639 2.7992
    2 8 0.53993 0.25557 2.7992
    2 9 -0.59803 -0.31891 2.7992
    2 10 0.60898 0.31773 2.7992
    2 11 -0.52595 -0.25514 2.7992
    2 12 0.41966 0.15176 2.7992
    2 13 -0.26767 -0.04991 2.7992
    2 14 0.15668 -0.021726 2.7992
    2 15 -0.053074 0.047413 2.7992
    2 16 0.017309 -0.040079 2.7992
    2 17 0.018299 0.019866 2.7992
    2 18 -0.0042937 -0.0060094 2.7992
    e

     
  • Ethan Merritt

    Ethan Merritt - 2011-03-18

    That command has the effect of creating, for each data set, N points with the same (x,y) coords. I.e. Each data set will show up as a single point if you plot "with points", and not at all for most other plot styles.

    Maybe you want

    plot '-' u (column(0)) : ($2==1?(prevy=$1,$1):prevy)

     
  • Nobody/Anonymous

    S8hnXv <a href="http://rvuzlojjlpmt.com/">rvuzlojjlpmt</a>, [url=http://lzrpufzyluvc.com/]lzrpufzyluvc[/url], [link=http://ensgdkmtktqx.com/]ensgdkmtktqx[/link], http://ayqxtbjpuqhj.com/

     
  • Nobody/Anonymous

    FTTY9Z <a href="http://jncblfntryhg.com/">jncblfntryhg</a>, [url=http://ntgilorhwgvd.com/]ntgilorhwgvd[/url], [link=http://raecdwovhxkv.com/]raecdwovhxkv[/link], http://mqtecxilyckq.com/

     
  • Nobody/Anonymous

    Nzhvh6 <a href="http://fxmjklvhemsi.com/">fxmjklvhemsi</a>, [url=http://njpfopbkcjgu.com/]njpfopbkcjgu[/url], [link=http://zfqoenkzgmcb.com/]zfqoenkzgmcb[/link], http://ojhwrxefpymy.com/

     
  • Ethan Merritt

    Ethan Merritt - 2011-04-26
    • status: open --> closed
     

Log in to post a comment.