Amit Kohli Amit Kohli - 4 months ago 15
R Question

Increase size of chart in Azure ML R script

I am trying to see a chart that I have produced within an R script module in Azure ML. It looks like this:

enter image description here

Needless to say, this is unusably small. I am looking for something like

... is there anything available?

Just in case, the script looks like this:

df <- dataset1
names(df) <- gsub("[- ]","x",names(df))
ggpairs(df, alpha=0.4)


One thing we can do is exporting the output plot to a pdf file and storing it to an Azure blob storage. for that you should create a blob storage in your azure storage. Then modify the script as follows.

d <- maml.mapInputPort(1)
df <- d
names(df) <- gsub("[- ]","x",names(df))
d <- ggpairs(df,  alpha=0.4)
b64ePDF <- function(filename) {
                maxFileSizeInBytes <- 5 * 1024 * 1024 # 5 MB
                return(base64encode(readBin(filename, "raw", n = maxFileSizeInBytes)))
d2 <- data.frame(pdf = b64ePDF("Rplots.pdf"))

Set your azure blob storage destination. The plot will save as a pdf. enter image description here