jasp-stats / jasp-issues

This repository is solely meant for reporting of bugs, feature requests and other issues in JASP.
57 stars 29 forks source link

Feature Request: Plot rotate x axis labels #1453

Open shun2wang opened 2 years ago

shun2wang commented 2 years ago

Often times it is useful to rotate the x axis labels to be vertical if there are too many labels and they overlap. This function accomplishes that and ensures the labels are horizontally centered relative to the tick line.

Consider enabling this function in the polts editing menu and adding corresponding buttons.

Here is a good tool and example https://datavizpyr.com/rotate-x-axis-text-labels-in-ggplot2/

kadewe commented 7 months ago

Correct me, if I am wrong:

this needs "only" an input element for "angle" (number between 0 and 360) and an "angle" parameter sneaked into the axis.text.x?

Example:

library(ggplot2) disprt <- data.frame(group = rep(c("AAAAAAAA", "BBBBBBBBBB"), 50), distances = rnorm(100)) ggplot(disprt, aes(group, distances)) + geom_boxplot() + theme(axis.text.x = element_text(angle = 45, vjust = 1, hjust = 1))

tomtomme commented 5 months ago

@kadewe I do not know. But if you have any chance to make a PR for jasps Plot Editor, that would be extremely cool!!!