plots icon indicating copy to clipboard operation
plots copied to clipboard

Feature to easily rotate y-axis label.

Open GregorySchwartz opened this issue 8 years ago • 2 comments

Right now, it looks like we need to do something like (basically from https://github.com/cchalmers/plots/issues/25):

yAxis . axisLabelTextFunction %= \f _ s -> f (BoxAlignedText 0.5 0.5) s # rotateBy (1/4)
yAxis . axisLabelGap *= 3

Instead, it would be nice if we could have a system similar to AxisLabelPosition or a simpler way to use rotateBy without needing to manually set the axisLabelGap nor the BoxAlignedText.

GregorySchwartz avatar Jul 21 '17 18:07 GregorySchwartz

I could add mkVerticalText :: TextAlignment -> String -> Diagram V2. Then it would be a case of

yAxis . axisLabelTextFunction .= mkVerticalText

cchalmers avatar Jul 22 '17 15:07 cchalmers

It seems that rotating tick labels on the x and y-axis are the same so could also benefit from this issue as well.

GregorySchwartz avatar Jul 24 '17 18:07 GregorySchwartz