-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
Hello,
I am having trouble with nesting in the x-axis. The error message is as follows:
Warning message:
In plot_theme(plot) :
The `ggh4x.axis.nestline.x` theme element is not defined in the element hierarchy.
The code I am running looks something like this:
df%>%
ggplot(., aes(x = paste0(var1,'&',var2), y = var3, fill = var4, width = 0.7))+
geom_bar(position = 'fill', stat = 'identity')+
guides(x = ggh4x::guide_axis_nested(delim = "&", angle = 70))+
scale_fill_manual(values = as.vector(my_color_pallette),
name='Var4')+
labs(x = NULL, tag = 'B)',
y = 'Var3)+
facet_grid(~var5, scale = 'free')+
theme_classic()+
theme(axis.text = element_text(size = 11),
legend.title = element_text(size = 11),
legend.text = element_text(size = 11),
legend.key.size = unit(1, 'cm'),
legend.key.height = unit(0.35, 'cm'),
legend.key.width = unit(0.35, 'cm'),
text = element_text(family = 'Times New Roman', size = 13),
ggh4x.axis.nestline.x=element_line(size = 1, colour = 'black'))
I have ggplot version 3.5.2 and ggh4x version 0.3.1.
How can I fix this problem? In advance, thank you.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels