Menu

#1957 5.2rc1 Inconsistent "data block" definition for 'every'

None
closed-invalid
nobody
None
2017-10-11
2017-08-14
Anonymous
No

The pseduo-column "-2" (data block) typically requires the data sets to be separated by two empty lines, and this works well for e.g. multi-branch fitting or the data modifier "index".
I found that start_block/end_block of "every" don't work properly if the sets are separated by 2 lines, but they require 1 empty line.
Take some arbitrary data with two blocks and try out either 1 or 2 empty lines between them:

plot "data" index 0, '' every :::1::1

will never produce the desired results.

Discussion

  • Karl Ratzsch

    Karl Ratzsch - 2017-08-25

    This should make clear what happens:

    $data << EOD
    1 # first block in first dataset
    2

    3 # second block
    4 # two blank lines should follow here, but sf doesn't allow that

    5 # first block in second ds
    6

    7 # etc.
    8
    EOD

    plot $data index 0 w l, $data every :::1::1 w l

    "data blocks" (addressed via "every") are separated by a single blank line, data sets (addressed by "index") by two.

     

    Last edit: Karl Ratzsch 2017-09-29
  • Karl Ratzsch

    Karl Ratzsch - 2017-08-25
    • status: open --> open-invalid
    • Group: -->
    • Priority: -->
     
  • Eldrad Ulthran

    Eldrad Ulthran - 2017-09-05

    So this is working as intended and "every" and "index" are supposed to act on different type of data? Then I suggest in pointing this out more precisely in the manual, because for me it reads as if "every :::0::0" and "index 0" did the same.

     
    • Karl Ratzsch

      Karl Ratzsch - 2017-09-14

      Can you point out the position in the help that you found misleading, and/or make a suggestion for improvement? The difference was always quite clear to me.

       
      • Eldrad Ulthran

        Eldrad Ulthran - 2017-09-15

        First of all I have to say that I'm not a native speaker and may miss some fine linguistic details which could appear obvious for others. A positive example of explaining data sets is "index" as well as the reference to it in "multi-branch fitting". There it is nicely explained that records inside a single data file can be separated into data sets by two empty lines.

        I then found the very first sentence in "every" to be misleading: "The every keyword allows a periodic sampling of a data set to be plotted."
        This made me think that "every" refers to the very same data sets I already knew from "index". Additionally the short description of "every" in "data" seems to be wrong: "every specifies which points within a single data set are to be plotted". But in fact "every" cycles through all available data sets.
        Oddly enough, "data sets" are not covered in the glossary.

        All in all it would be nice to have some sort of direct comparison or juxtaposition of the concepts record, point, block and set, e.g. just like you did in your first reply (btw. there is a blank line missing between 4 and 5). Maybe as a small sub-chapter "data structure", or inside the glossary with cross-refs throughout the doc.

         
  • Ethan Merritt

    Ethan Merritt - 2017-10-11
    • status: open-invalid --> closed-invalid
     

Log in to post a comment.

MongoDB Logo MongoDB