experiments/gnuplot_seasonal_plot.git
5 years agofull_range_monthly.gnuplot: fix sampling when drawing boxes
Antonio Ospite [Fri, 30 Nov 2018 10:29:09 +0000 (11:29 +0100)]
full_range_monthly.gnuplot: fix sampling when drawing boxes

Instead of working around the problem by doubling the sample rate, fix
the actual problem and prevent different samples to refer to the same
box, resulting in holes in the background.

The solution is to have samples fall in the middle of months instead of
their boundaries, this compensates for the fact that different months
having a slightly different number of days.

Now two different samples are always in two different months.

5 years agoFix errors with recent gnuplot versions
Antonio Ospite [Thu, 29 Nov 2018 10:31:24 +0000 (11:31 +0100)]
Fix errors with recent gnuplot versions

It looks like recent gnuplot versions do not keep variables around when
they get out of scope, like a counter used only inside a loop.

This results in some errors in the modular scripts:

  ./modular_cartesian.gnuplot", line 62: undefined variable: i
  ./modular_polar.gnuplot", line 59: undefined variable: i

Fix this by using 'year_max' instead of 'i' outside of the loop where
'i' was defined.

Since 'year_max' is a float variable string concatenation would not work
with it, resulting in the following errors:

  ./modular_cartesian.gnuplot", line 62: internal error : STRING operator applied to undefined or non-STRING variable
  ./modular_polar.gnuplot", line 59: internal error : STRING operator applied to undefined or non-STRING variable

So while at it also convert the float to an integer so that the result
can be used with the string concatenation operator.

9 years agoInitial import
Antonio Ospite [Mon, 22 Dec 2014 13:57:03 +0000 (14:57 +0100)]
Initial import