Controlling the disconnects in line plots?

Welcome to our Forums Technical Support Support Desk Controlling the disconnects in line plots?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #6040
    jooil kim
    Participant

      A question on the line connections between data points in a time series plot (i.e. x-axis is time stamps) for a “plot” command. I want to get a better sense of how data gaps are detected, and if some functionality could be added to manually control this behavior. Thanks!

      #6041
      dgteam
      Moderator

        Do you mean something like a case where you have measurements taken at even intervals (e.g., daily) but you want to only connect consecutive days? and identify where the missing days are?

         

         

        #6043
        jooil kim
        Participant

          Sort of. The data I’m plotting is a multi-year time series, roughly 2-hourly intervals, but it’s not always uniform. I have various data gaps in the data when the instrument was down, some gaps are short (a few hours), others are long (few months). I see that DG sometimes finds these gaps, but mostly not, and so wanted to understand what’s going on internally. For the functionality, yes, something like being able to say “detect data gaps if x-axis interval is longer than [2 hours, or some numeric metric based on the units of the x-axis data] would be really useful. Does that make sense?

          #6045
          dgteam
          Moderator

            We uploaded a worked example in File > On-line examples to show how to identify gaps in a time series.

            Would be great if you could look this file over and see if this helps.

            SkippingBreaks

            #6046
            jooil kim
            Participant

              Looking through the example, and WOW, that’s some really interesting/advanced DG programming! I think I can work through the example and get things running on my DG file.

              But going one more step: If I wanted to pre-generate the data gaps in R to pass off to DG, I should look into literally adding an empty line in the data? Just to save a bit of testing on my end: Does the line have to be empty for both the x-axis and y-axis columns, or is being empty in either of the columns enough? Can I put NA’s or NaN’s instead of the making it empty?

              #6048
              dgteam
              Moderator

                Exactly!  The Plot command will not connect when there is a missing point in either the x or y.  You can do this with an empty row or enter NaN (nan works too).   If you ever want to override these breaks there is a check box in the Plot command to “Bridge gaps in data”.

                #6053
                jooil kim
                Participant

                  Thanks again for all the very helpful information, good to know I will be able to exactly control my line connection points by adding empty rows in the data!

                Viewing 7 posts - 1 through 7 (of 7 total)
                • You must be logged in to reply to this topic.

                Welcome to our Forums Technical Support Support Desk Controlling the disconnects in line plots?