Groups
Sign in
Groups
ggplot2
Conversations
About
Send feedback
Help
No plot when texts along the x axis (written vertically for convenience) are too long
45 views
Skip to first unread message
Alchiba
unread,
Oct 26, 2022, 1:23:21 PM
10/26/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ggplot2
Hi everyone,
it seems that when axis x text lenghts are too big the plot which represents the corresponding histogram or barplot just vanishes.
Is there some solution to get a histogram or barplot with long texts along the x axis ?
Thanks for help.
Alain
Robert Winkelman
unread,
Oct 27, 2022, 8:05:17 PM
10/27/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ggplot2
It would be good to see the code that does this.
But here is a way to handle axis x text lengths that are too big:
https://ggplot2-book.org/scale-position.html?q=n.dodge#guide-axis
Derek du Preez
unread,
Oct 28, 2022, 6:47:24 AM
10/28/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ggplot2
I like the option of moving the x axis to the y axis using coord_flip()
Robert Winkelman
unread,
Oct 28, 2022, 9:19:02 AM
10/28/22
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to ggplot2
Good point. That is probably the first option to consider.
Reply all
Reply to author
Forward
0 new messages