Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Wrong label values on the Y-axis in a time series

6 views
Skip to first unread message

tkarcher

unread,
Jan 27, 2012, 4:14:13 AM1/27/12
to
Any idea why the following graphs show "2024" as the last label value
on the Y-axis instead of "2025"?
http://commons.wikimedia.org/wiki/File:Bielefeld_population.svg
http://commons.wikimedia.org/wiki/File:Eberswalde_population.svg
(Both generated on a Windows system with gnuplot 4.4 Patchlevel 4. The
script is attached to the description of the files. Also discussed
here: http://commons.wikimedia.org/wiki/Commons:Graphics_village_pump#Gnuplot_problem:_Wrong_label_values_on_the_Y-axis)
Thanks, Thomas

Christoph Bersch

unread,
Jan 27, 2012, 5:08:11 AM1/27/12
to
Hi Thomas,
The xtics increment which you use (788400000) corresponds to 25 years
with 365 days, but one year has 365.25 days. I haven't looked into the
gnuplot sources how the time differences are handled but I guess this is
the problem. If you use 7885000000 the labels are correct.

Christoph

Hermann Peifer

unread,
Jan 27, 2012, 10:18:56 AM1/27/12
to
On 27/01/2012 11:08, Christoph Bersch wrote:
>
> The xtics increment which you use (788400000) corresponds to 25 years
> with 365 days, but one year has 365.25 days. I haven't looked into the
> gnuplot sources how the time differences are handled but I guess this is
> the problem. If you use 7885000000 the labels are correct.
>

Just out of curiosity: how did you get to 7885000000 seconds per 25
years, given that a year has 365.25 (or perhaps: 365.2425) days?

Hermann





tkarcher

unread,
Jan 27, 2012, 10:57:01 AM1/27/12
to
On 27 Jan., 11:08, Christoph Bersch <use...@bersch.net> wrote:
> Hi Thomas,
>
> On 27.01.2012 10:14, tkarcher wrote:
>
> > Any idea why the following graphs show "2024" as the last label value
> > on the Y-axis instead of "2025"?
> >http://commons.wikimedia.org/wiki/File:Bielefeld_population.svg
> >http://commons.wikimedia.org/wiki/File:Eberswalde_population.svg
> > (Both generated on a Windows system with gnuplot 4.4 Patchlevel 4. The
> > script is attached to the description of the files. Also discussed
> > here:http://commons.wikimedia.org/wiki/Commons:Graphics_village_pump#Gnupl...)
>
> The xtics increment which you use (788400000) corresponds to 25 years
> with 365 days, but one year has 365.25 days. I haven't looked into the
> gnuplot sources how the time differences are handled but I guess this is
> the problem. If you use 7885000000 the labels are correct.
>
> Christoph

*facepalm* So obvious, and yet I didn't think of it. I changed the
value to 7.889238e8 now (60*60*24*365.2425*25), and it worked just
fine.

Thanks!
0 new messages