Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project!

## [Plplot-general] xticks with time

 [Plplot-general] xticks with time From: Peter Johansson - 2011-04-26 00:36:49 ```Hello plplotters, I'm using plplot in a program to create a plot where x-axis is time. The time scale is a couple of years and I found that plplot chooses place the xtics at 'Dec ' e.g. 'Dec 2006' or 'Dec 2007'. Changing the time-fmt I figured out that the first ticks are set at "2006 Dec 31 06:00", "2007 Dec 31 12:00", "2008 Dec 31 18:00", "2009 Dec 31 00:00" et cetera. Firstly, the ticks are placed on Dec 31st while I would expect the to be on New Year Jan 1st 00:00:00. My guess is that the tick somehow is set to Jan 00 which in a sense corresponds to Dec 31. Secondly, it seems like the distance between two ticks are 365.25 days rather than a year. This doesn't matter that much as long as the tick doesn't jump back to Dec 31 dues to a leap year. Let me know if I can give some more information. I'm using plplot version 5.9.6. Thanks, Peter ```

 [Plplot-general] xticks with time From: Peter Johansson - 2011-04-26 00:36:49 ```Hello plplotters, I'm using plplot in a program to create a plot where x-axis is time. The time scale is a couple of years and I found that plplot chooses place the xtics at 'Dec ' e.g. 'Dec 2006' or 'Dec 2007'. Changing the time-fmt I figured out that the first ticks are set at "2006 Dec 31 06:00", "2007 Dec 31 12:00", "2008 Dec 31 18:00", "2009 Dec 31 00:00" et cetera. Firstly, the ticks are placed on Dec 31st while I would expect the to be on New Year Jan 1st 00:00:00. My guess is that the tick somehow is set to Jan 00 which in a sense corresponds to Dec 31. Secondly, it seems like the distance between two ticks are 365.25 days rather than a year. This doesn't matter that much as long as the tick doesn't jump back to Dec 31 dues to a leap year. Let me know if I can give some more information. I'm using plplot version 5.9.6. Thanks, Peter ```
 Re: [Plplot-general] xticks with time From: Alan W. Irwin - 2011-04-26 04:00:44 ```On 2011-04-25 20:36-0400 Peter Johansson wrote: > Hello plplotters, > > I'm using plplot in a program to create a plot where x-axis is time. The > time scale is a couple of years and I found that plplot chooses place > the xtics at 'Dec ' e.g. 'Dec 2006' or 'Dec 2007'. Changing the > time-fmt I figured out that the first ticks are set at "2006 Dec 31 > 06:00", "2007 Dec 31 12:00", "2008 Dec 31 18:00", "2009 Dec 31 00:00" et > cetera. > > Firstly, the ticks are placed on Dec 31st while I would expect the to be > on New Year Jan 1st 00:00:00. My guess is that the tick somehow is set > to Jan 00 which in a sense corresponds to Dec 31. > > Secondly, it seems like the distance between two ticks are 365.25 days > rather than a year. This doesn't matter that much as long as the tick > doesn't jump back to Dec 31 dues to a leap year. > > Let me know if I can give some more information. > > I'm using plplot version 5.9.6. Hi Peter: Thanks for your interest in time issues for PLplot. Our time documentation is currently limited and out of date. For example, we now use our own independent qsastime library (original code donated by the QSAS group and substantially modified by us) to provide behind-the-scenes time functionality that mimics (with some important improvements) Unix time functionality in a way that will work on all platforms. We have also made some improvements to the PLplot time API that accesses that behind-the-scenes time functionality. Because of the current bad state of our time documentation, I suggest for those just starting to use our time functionality API that they first look at standard example 29 to see how to use that functionality. Getting back to the present issue, example 29 has some pages where the time range is specified exactly, and that may be all you need to get the ticks at the exact time intervals that you want. However, if that doesn't work I suggest you give us a complete but simple test case (say a subset of example 29 in the language you are most comfortable with) that demonstrates time format functionality that you think needs improving. We are open to good suggestions here because a lot of the PLplot time API is (relatively) new to us as well. Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ ```
 Re: [Plplot-general] xticks with time From: Peter Johansson - 2011-04-26 23:37:56 Attachments: main.cc ```Hi Alan, On 4/26/11 12:00 AM, Alan W. Irwin wrote: > Getting back to the present issue, example 29 has some pages where the > time range is specified exactly, and that may be all you need to get > the ticks at the exact time intervals that you want. However, if that > doesn't work I suggest you give us a complete but simple test case > (say a subset of example 29 in the language you are most comfortable > with) that demonstrates time format functionality that you think needs > improving. We are open to good suggestions here because a lot of the > PLplot time API is (relatively) new to us as well. I've attached a small test case for my issue. The time range is 10^8 seconds which corresponds to ~3.2 years so I expect years to be used as time unit and that xticks are located on new year, i.e., Jan 01 00:00. With plplot 5.9.6 I get xticks 31 06:00, 31 12:00, and 31 18:00. Thanks, Peter ```