I've noticed that using theme_phs() seems to delete any axis titles you provide, which doesn't seem ideal to me - is this PHS policy to have no axis titles / is there an easy way to circumvent this behaviour?
Basic example:
## Using theme_phs()
library(phsstyles)
library(tidyr)
# Create test data
a <- 1:10
t <- tibble(a, b = a **2)
# Output 1
t %>% ggplot(aes(x=a, y=b)) +
geom_point() +
labs(x="x label", y="y label")
# Output 2
t %>% ggplot(aes(x=a, y=b)) +
geom_point() +
labs(x="x label", y="y label") +
theme_phs()
Where Output 1 is
and Output 2 is
despite the fact x and y labels are specified.
I'm guessing this is because in theme_phs()axis.titleis set to element_blank()?
EDIT: I made a local branch (don't have permissions to link to origin) and tried setting axis.title as element_text() but this didn't solve the issue. I am guessing somehow I have to set the x label to the axis.text parameter but I'm not sure how to do this. Regardless I think it'd be good if the theme didn't wipe axis labels that are there to begin with.
I've noticed that using
theme_phs()
seems to delete any axis titles you provide, which doesn't seem ideal to me - is this PHS policy to have no axis titles / is there an easy way to circumvent this behaviour?Basic example:
Where Output 1 is![image](https://user-images.githubusercontent.com/33020850/158337046-5f62a94f-78eb-4228-9bfd-281dcc956f07.png)
and Output 2 is![image](https://user-images.githubusercontent.com/33020850/158337092-2c8d0989-ba93-4ad9-99df-2a0be6f85f4d.png)
despite the fact x and y labels are specified.
I'm guessing this is because in
theme_phs()
axis.title
is set toelement_blank()
?EDIT: I made a local branch (don't have permissions to link to origin) and tried setting
axis.title
aselement_text()
but this didn't solve the issue. I am guessing somehow I have to set the x label to theaxis.text
parameter but I'm not sure how to do this. Regardless I think it'd be good if the theme didn't wipe axis labels that are there to begin with.