Specifying X tick marks for time axis

DataGraph Forums Technical Support Support Desk Specifying X tick marks for time axis

  • This topic has 4 replies, 2 voices, and was last updated 4 years ago by kourosh kalayeh.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #5198
    kourosh kalayeh
    Participant

      Hi,

      I cannot figure out what format to use to specify “X tick marks” when mu X axis is time.  The automatic option gives me tick marks every 5 minutes, I want it to be every 1 minute.

      Thanks,
      Kourosh

      #5204
      dgteam
      Moderator

        Hi Kourosh,

        Part of the the solution here could be to change the automatic settings.  I made an example and can see how the program switches a little soon to less tick marks for time.

        Example1

        To get this to display in minutes, I calculated a minutes column and then used that for the x-axis.

        Example2

         

         

        #5205
        kourosh kalayeh
        Participant

          Hi,

          The issue with the proposed solution is that I will miss the time stamps.  Ideally, I want to have time stamps as they are (hh:mm:ss) and have X tick marks every minutes.

          Thanks,
          Kourosh

          #5206
          dgteam
          Moderator

            See if this approach works…

            Here is an example that seems to have the same issue where you might want more increments shown:

            TimeExample_TooWide

            You can have a column where you specify the exact location and label you want for the tick mark locations.  To do this with dates you can use an expression to create a column that has the time increment where you want to place the labels.

            In this example, my data starts on the 10th hour of 2020/1/1. The seconds function will take the year, month, day, hour as input and output the date format (seconds since 1970).  Then I added 60 seconds increments.  Here is the expression:

            seconds(2020,1,1,10)+ 60*(#-1)

            Change the Type to ‘Date’ to display as a date and time to check that you have the correct values.  I added a second expression called ‘TimeLabel’ that returns the same TimeExpression but displays in the format for the tick labels.

            CreateLabels

            In the Axis settings,  set X tick marks to ‘Labels’, set the Location to the ‘TimeExpression’ and the Label to the ‘TimeLabel’.

            TimeExample_NiceWide

            Note that the Location and Label could come from the same column, but I think it is helpful see the full date and time in the first expression, and then format in another column.

            Does this help?

            #5207
            kourosh kalayeh
            Participant

              Yes, perfect.

              Thanks,
              Kourosh

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

            DataGraph Forums Technical Support Support Desk Specifying X tick marks for time axis