Home > OS >  Why is the time axis in my ggplot2 gantt diagram German?
Why is the time axis in my ggplot2 gantt diagram German?

Time:10-19

I have the following tibble and wanted to make a Gantt diagram with it as in Gantt diagram

I have to admit, I am German and the rest of my computer is set to German, but nothing in my RStudio is. So why does it print the month like that and how can I change it?

CodePudding user response:

This depends of the setting of your "locale". Use e.g. the following code in your terminal to set this to "English" on Windows

Sys.setlocale("LC_ALL", "English")

Your X-axis labels will now follow the new locale setting.

FYI: SessionInfo() will also reflect the change:

...
locale:

[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252   
...
  • Related