Question about sjPlot lines and scale

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Question about sjPlot lines and scale

Dear all,

I am wanting to improve a plot made with the package sjPlot.

When plotting this model

Plot produced looks like this,
especially red and green lines.

I just have two concerns with this, the first one is that lines seem a bit
pixelated, and I would like to improve it, I have tried some approaches but
it has not been possible.

Dataset in this link:

#Copy dataset before following the code
dat <- read.delim("clipboard", dec=","); attach(dat)

dat$Id <- as.integer(factor(dat$Esp))
m5 <- geeglm(
  formula = tim ~ Pa*Pt,
  family = Gamma(link = log),
  data = dat,
  id = Id,
  corstr = "exchangeable"


p=  plot_model(m5, type = "pred", terms = c("Pt[n=100]", "Pa"),


The second one, is I would like to remove the decimal values (i.e. in the x
axis), however I´m not very sure if it is possible to do this in sjPlot or
if you know a similar alternative in ggplot2. I tried this approach but it
did not work.

p=p+ scale_x_discrete(limits=c(1,2,3))

When making this plot, there is a space before 1 and after 3 I would like
to erase.


        [[alternative HTML version deleted]]

[hidden email] mailing list -- To UNSUBSCRIBE and more, see
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.