Removing labels from marginal effects plot (plot_cme) with factor variable.

Hey! How do I remove the top labels "2-1" & "3-1" or simply rename them?

I am using the marginaleffects package and command "plot_cme":

plot_cme(interaktion_uk,
effect = "treatment",
condition = "age",
conf_level = 0.95)

Thanks!!!

Welcome to the community @augustoelsgaard! According to the documentation, plot_cme() returns a ggplot2 object. For this example, the object appears to be faceted. Without the model, it's hard to tell for sure, but does the following work to remove the top labels?

plot_cme(interaktion_uk,
         effect = "treatment",
         condition = "age",
         conf_level = 0.95) +
  theme(strip.text = element_blank())

The code worked out. Thanks a lot Scott!
Regards
August

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.