sinhrks / ggfortify

Define fortify and autoplot functions to allow ggplot2 to handle some popular R packages.
Other
525 stars 65 forks source link

Saving error with ggsave for autoplot() similiar to #98 #226

Open Max-Trouble opened 1 year ago

Max-Trouble commented 1 year ago

Is it just me or is it not working again? I am using CRANs ggfortify version 0.4.16. For the following code

library(ggplot2)
library(ggfortify)

# Create some example data
x <- 1:10
y <- c(2, 3, 4, 5, 6, 7, 8, 9, 10, 11)

# Fit the model
model <- lm(y ~ x)

autoplot(model, which = 1:4, label.size = 3) + theme_bw()
ggsave("model.png",width=22,height=15,units="cm",dpi=150)

it is just saving the last plot (Cook´s distance in my case) like in https://github.com/sinhrks/ggfortify/issues/98#issuecomment-237037986

Originally posted by @Max-Trouble in https://github.com/sinhrks/ggfortify/issues/98#issuecomment-1575798517