Created
May 9, 2009 23:50
-
-
Save andruby/109446 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE OR REPLACE FUNCTION r_scatter(title text, sql text) | |
RETURNS text AS | |
$BODY$ | |
str <- pg.spi.exec (sql); | |
pdf('/tmp/scatter_plot.pdf'); | |
plot(str,main=title,cex=0.3, pch=20,col=rgb(255,0,0,2,maxColorValue=255),ylim=c(0,100)); | |
dev.off(); | |
print('done'); | |
$BODY$ | |
LANGUAGE 'plr' VOLATILE; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment