Loading ...
Sorry, an error occurred while loading the content.

Re: Minor issue re. date range spanning new-year

Expand Messages
  • Steve Grubb
    Thomas, thanks for this report. I am aware of the EasyTimeline tool but don t use it, and am not familiar w/ exactly how it works. The code shown in the raw
    Message 1 of 3 , Nov 12, 2008
    • 0 Attachment
      Thomas, thanks for this report.  I am aware of the EasyTimeline tool but don't use it, and am not familiar w/ exactly how it works.  The code shown in the raw view isn't a ploticus script.

      I will check and see if the problem occurs with a plain vanilla ploticus script.

      -Steve

      ---------- Forwarded message ----------


      Hello,

      EasyTimelinePlugin with ploticus installed and working.
      When a date range spans new-year the tics can become mis-aligned.

      > 1. First, make a fair effort towards learning the tool and solving the
      problem yourself.

      It looks like the tics are spaced based on a date-range days-count that is
      one day off.

      I first thought there might be something fishy in the overly complicated
      juliandayno code in dates.c
      but behaviour is unchanged after replacing it with known good code (provided
      for completeness):

      < static long
      < _jul( y, m, d, offset )
      < int y;                /* year */
      < int m;                /* month */
      < int d;                /* day */
      < long offset;  /* calibrate for this julian day 0 */
      < {
      <     if (m++<3) { m += 12; --y; }
      <     d += (int)(30.6*m)-63;
      <     d += y*365+(int)(y/4)-(int)(y/100)+(int)(y/400);
      <     return d-offset;
      < }
      <
      < static int
      < jul( y, m, d, julian )
      < int y;                /* year */
      < int m;                /* month */
      < int d;                /* day */
      < long *julian; /* julian date result */
      < {
      <     *julian = _jul( y, m, d, _jul( 1977, 1, 1, 0));
      <     return 0;
      < }



      > 2. Include a stripped-down self-contained example that exhibits the
      problem.

      http://xenoc.demon.co.uk/twiki/bin/view/Interests/EasyTimelinePluginDev
      http://xenoc.demon.co.uk/twiki/bin/view/Interests/EasyTimelinePluginDev?raw=
      on

      > 3. Use the -debug option .. and send the diagnostic results

      N/A.

      > 4. Indicate computing platform (Red Hat 7.2? Solaris 8? NT 4.0?)

      CentOS 4.4

      > 5. Indicate the exact pl command you used and describe exactly how you
      invoked pl (command line? CGI?) If you use a config file please attach this
      as well.

      N/A.

      > 6. Double check to be sure everything is correct. Did you attach the
      correct script and data set? Did you describe the problem clearly and
      succinctly?

      Should be reproducible from the ploticus scripts embedded in the (raw view)
      wiki page.

      Kind Regards

      --
      Thomas


    • ploticus@xenoc.demon.co.uk
      Hello, I figured out how to use the EasyTimeline.pl script to generate the ploticus scripts from the EasyTimeline scripts. I have attached the first four
      Message 2 of 3 , Nov 12, 2008
      • 0 Attachment
        Hello,
         
        I figured out how to use the EasyTimeline.pl script
        to generate the ploticus scripts
        from the EasyTimeline scripts.
         
        have attached the first four ploticus scripts (text files) to the wiki page
        with links just before the images.
         
        --
        Thomas Schodt
         
         
        -----Original Message-----
        From: Steve Grubb [mailto:stevegrubb@...]
        Sent: 12 November 2008 13:33
        To: ploticus@...
        Cc: ploticus@yahoogroups.com
        Subject: Re: Minor issue re. date range spanning new-year

        Thomas, thanks for this report.  I am aware of the EasyTimeline tool but don't use it, and am not familiar w/ exactly how it works.  The code shown in the raw view isn't a ploticus script.

        I will check and see if the problem occurs with a plain vanilla ploticus script.

        -Steve

        ---------- Forwarded message ----------


        Hello,

        EasyTimelinePlugin with ploticus installed and working.
        When a date range spans new-year the tics can become mis-aligned.

        > 1. First, make a fair effort towards learning the tool and solving the
        problem yourself.

        It looks like the tics are spaced based on a date-range days-count that is
        one day off.

        I first thought there might be something fishy in the overly complicated
        juliandayno code in dates.c
        but behaviour is unchanged after replacing it with known good code (provided
        for completeness):

        < static long
        < _jul( y, m, d, offset )
        < int y;                /* year */
        < int m;                /* month */
        < int d;                /* day */
        < long offset;  /* calibrate for this julian day 0 */
        < {
        <     if (m++<3) { m += 12; --y; }
        <     d += (int)(30.6*m)-63;
        <     d += y*365+(int)(y/4)-(int)(y/100)+(int)(y/400);
        <     return d-offset;
        < }
        <
        < static int
        < jul( y, m, d, julian )
        < int y;                /* year */
        < int m;                /* month */
        < int d;                /* day */
        < long *julian; /* julian date result */
        < {
        <     *julian = _jul( y, m, d, _jul( 1977, 1, 1, 0));
        <     return 0;
        < }



        > 2. Include a stripped-down self-contained example that exhibits the
        problem.

        http://xenoc.demon.co.uk/twiki/bin/view/Interests/EasyTimelinePluginDev
        http://xenoc.demon.co.uk/twiki/bin/view/Interests/EasyTimelinePluginDev?raw=
        on

        > 3. Use the -debug option .. and send the diagnostic results

        N/A.

        > 4. Indicate computing platform (Red Hat 7.2? Solaris 8? NT 4.0?)

        CentOS 4.4

        > 5. Indicate the exact pl command you used and describe exactly how you
        invoked pl (command line? CGI?) If you use a config file please attach this
        as well.

        N/A.

        > 6. Double check to be sure everything is correct. Did you attach the
        correct script and data set? Did you describe the problem clearly and
        succinctly?

        Should be reproducible from the ploticus scripts embedded in the (raw view)
        wiki page.

        Kind Regards

        --
        Thomas


      • ploticus@xenoc.demon.co.uk
        Hello, Thank you for guiding me in the right direction. I did indeed locate a minor issue in the EasyTimeline tool. The fix I implemented seems to work for
        Message 3 of 3 , Nov 13, 2008
        • 0 Attachment
          Hello,
           
          Thank you for guiding me in the right direction.
           
          I did indeed locate a minor issue in the EasyTimeline tool.
           
          The fix I implemented seems to work
          for what I am trying to use EasyTimeline for.
           
          The updated EasyTimeline.pl script (zip) and diff output (txt) are attached to
            <http://xenoc.demon.co.uk/twiki/bin/view/Interests/EasyTimelinePluginDev>
           
          Kind Regards
           
          --
          Thomas Schodt
           
          -----Original Message-----
          From: Steve Grubb [mailto:stevegrubb@...]
          Sent: 12 November 2008 13:33
          To: ploticus@...
          Cc: ploticus@yahoogroups.com
          Subject: Re: Minor issue re. date range spanning new-year

          Thomas, thanks for this report.  I am aware of the EasyTimeline tool but don't use it, and am not familiar w/ exactly how it works.  The code shown in the raw view isn't a ploticus script.

          I will check and see if the problem occurs with a plain vanilla ploticus script.

          -Steve

          ---------- Forwarded message ----------


          Hello,

          EasyTimelinePlugin with ploticus installed and working.
          When a date range spans new-year the tics can become mis-aligned.

          > 1. First, make a fair effort towards learning the tool and solving the
          problem yourself.

          It looks like the tics are spaced based on a date-range days-count that is
          one day off.

          I first thought there might be something fishy in the overly complicated
          juliandayno code in dates.c
          but behaviour is unchanged after replacing it with known good code (provided
          for completeness):

          < static long
          < _jul( y, m, d, offset )
          < int y;                /* year */
          < int m;                /* month */
          < int d;                /* day */
          < long offset;  /* calibrate for this julian day 0 */
          < {
          <     if (m++<3) { m += 12; --y; }
          <     d += (int)(30.6*m)-63;
          <     d += y*365+(int)(y/4)-(int)(y/100)+(int)(y/400);
          <     return d-offset;
          < }
          <
          < static int
          < jul( y, m, d, julian )
          < int y;                /* year */
          < int m;                /* month */
          < int d;                /* day */
          < long *julian; /* julian date result */
          < {
          <     *julian = _jul( y, m, d, _jul( 1977, 1, 1, 0));
          <     return 0;
          < }



          > 2. Include a stripped-down self-contained example that exhibits the
          problem.

          http://xenoc.demon.co.uk/twiki/bin/view/Interests/EasyTimelinePluginDev
          http://xenoc.demon.co.uk/twiki/bin/view/Interests/EasyTimelinePluginDev?raw=on

          > 3. Use the -debug option .. and send the diagnostic results

          N/A.

          > 4. Indicate computing platform (Red Hat 7.2? Solaris 8? NT 4.0?)

          CentOS 4.4

          > 5. Indicate the exact pl command you used and describe exactly how you
          invoked pl (command line? CGI?) If you use a config file please attach this
          as well.

          N/A.

          > 6. Double check to be sure everything is correct. Did you attach the
          correct script and data set? Did you describe the problem clearly and
          succinctly?

          Should be reproducible from the ploticus scripts embedded in the (raw view)
          wiki page.

          Kind Regards

          --
          Thomas


        Your message has been successfully submitted and would be delivered to recipients shortly.