Create write_x_axis_value function

This allows the x axis values to be written consistently for both stacked and non-stacked graphs. In particular, the setXValuesInterval option now works for stacked graphs.