R forestplot package blank lines with section headings - r

I want to generate a forest plot using the forestplot package in R that looks like the following image
I have several sections I want to join together in a single long plot with a single axis at the bottom, but with the section headings separating each one. I can generate each forestplot independently and put them together, but the elements do not line up.
How do I generate the plot like this?

Related

How to line up bars on a plot in markdown?

I'm using r-markdown to make one pagers. I have all my plots set in place but they do not line up nicely. The plots area is lined up but where the bars start is different for each plot. How can i set it so that it's always lined up? I want to line up the green lines.The start of the plots (maroon line) is always in line.
NB! The two plots are made separately from one another as they use different data.

How to crop plots with R officer package?

When exporting plots to a .docx with the officer package, a lot of white space is created around the plots.
That way it is using up way to much space in the word document. It would be nice to crop the picture to get rid of the white space around the plot, so it looks more like this:
I don't know (1) if I have to set the dimension/size of the plot when I create the plot or (2) when I export the plot to the .docx with officer package.
Because I have a lot of plots that are getting exported (which are roughly of the same content and seize), I am looking for a good way to let them look the same.

How to easily make labels for stacked area charts in R like in D3plus

D3plus automatically shrinks and arranges labels for stacked area plots. Is it possible to do the same in R?
I understand that there is a D3Plus package for R but before I walk through their code, I want to be sure that no one has already created a helper function to do this natively. Here is a link to the D3plus code and below are two examples.

R: Lattice Plots/Wireframe : Splitting Panel Plots into single plots

How can I force wireframe panels to produce single plots instead of one panel plot/grid plot? The reason is that if I have to produce a Sweave/ Pdf File the original wireframe plot, which R produces and which you can see in my other post
Faceted Lattice Plots in R, e.g., wireframes: How to remove strips and add 1-Line subtitles.
will look very small, especially if I have many many single wireframe plots. I can handle single plots more easily in Sweave.
Lattice allows you to specify the number of columns and rows for the plots which then spill over onto adjacent pages if a multi-page device is used:
pdf("nine.pdf", onefile=TRUE, paper="special")
wireframe(pred~Sepal.Width+Petal.Width|interaction(Species,Petal.Length),
pd, drape=FALSE,scale=list(arrows=FALSE), subset=(Species=="setosa"),
layout=c(1,1,9))
dev.off()
On the console device they create new plots which stack up in the plot device and you can "scroll-back" with keystrokes that may vary depending on your unstated OS. The eps format is accessible using directions in ?ps.

multiple plots in r, a, b, c, d with lines and curves

I have some pretty nice plots that I want to present in a report, but I would like to have multiple plots with one common legend, title and caption. The problem is the lines in the plots. So far I have made a plot and added lines or curves from one or several binomial models. These curves/lines exist in different data.frames, but they can fit in the same plot because they have the same parameters and lengths.
I have tried to make a plot where I add all the lines at the same time as the plot is being created but then only the lines show up and i got a lot of errors.
So when i create a plot with lines i do like this:
plot(Spruce,Leaves,xlab="Spruce",ylab="Leaves>0")
g=glm(Leaves>0~Spruce,family=binomial,data=1)
g2=glm(Leaves>0~Spruce,family=binomial,data=2)
curve(predict(g,data.frame("Spruce"=x),type="resp"),add=TRUE,col="blue")
curve(predict(g2,data.frame("Spruce"=x),type="resp"),add=TRUE,col="red")
I cannot upload a picture of the plot, but it's nice.
The problem is that I need to present it with several other plots to explain my point and then I would like to do it as one of several a,b,c,d plots.
I have used
par(mfrow=c(2,2))
To have all plots visual at the same time but I would like to name them a,b,c,d and have a common legend, title and mtext.
Any suggestions how to do that?

Resources