changes stacking and grouping to x-axis and y-axis