ggplot in r-templates

Hello again

I'm trying to get ggplot working in templates, but i'm not doing such a great job at it.

My script works in R, this is what i want to get:

and this is the script in R to get it.

my used data can be found here:

My template is located here:

I just use a filereader and a R Plot as variables I give in these values:

When I execute the node, I get a blank screen.

Has anybody already tried working with ggplot in r-templates or can anybody get me on the right track?

Kind regards


Hi Kris,

if you use other than basic plots it's necessary to 'print' them. Just try the following:


myplot <- ggplot(qc, aes(x=as.character(PlateId))) + 
		opts(title="blabla") +
		geom_bar(aes(y=HC.Maximum), binwidth=1, stat="identity", fill="cyan") + 
		geom_errorbar(aes(ymin=HC.Median-(HC.Stdev*3), ymax=HC.Median+(HC.Stdev*3)), colour="red") + 
		geom_errorbar(aes(ymin=LC.Median-(LC.Stdev*3), ymax=LC.Median+(LC.Stdev*3)), colour="purple")

I've already worked with ggplots in RPlot nodes and it works.
I hope, I could help you


Hi Antje

Thank you, that did the trick.

Kris :)


You are referring to using ggplot in RPlot nodes. Do you mean the R View (local) node? Does ggplot work without an R server, just with the R Statistics Integration binaries for Windows?


No, I speak about the nodes from our Scripting Integration plugin (
For these R nodes you would need a running R-server (can be locally started in the R console without any problems. I'll tell you details if you are interested in but there should be enough documentation too).