I am new to R and I am trying to plot multiple CUSUM charts in one display. I have tried par(mfrow=c(2,1)), layout(), cowplot() and it did not work.
The function mentioned does makes the 1st CUSUM chart smaller and be plotted like normal plot(); successfully plotted 1st CUSUM at top half. However, the 2nd CUSUM chart just refreshes the display automatically instead of being plot below the 1st chart in the same display. Any solution or just possible solution is welcomed, many thanks in advance.
To be clear, I am not talking about plotting 'cumsum' data but CUSUM charts with the cusum() function like the following: cusum(data, std.dev = standard_deviation_of_data, center = center, add.stats=FALSE, xlab="Studies", title="CUSUM chart", labels=labels)
The issue is most likely associated with the fact that a plot of class "cusum.qcc" is generated.
I do not know how to make this work as a base r plot.
I tried various ways to plot in base r including: par(mfrow...), layout(...), and par(... new = TRUE)
Also tried to convert the cusum plot into a
grobso as to usegridExtra::grid.arrange()None of these efforts worked, so resorted to saving the plots as images and combining images
data
save as images
read and combine images
Created on 2020-07-09 by the reprex package (v0.3.0)