You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@livy.apache.org by "Matthias (JIRA)" <ji...@apache.org> on 2018/01/15 15:18:00 UTC

[jira] [Created] (LIVY-433) Livy R plot does not allow to define size of plot

Matthias created LIVY-433:
-----------------------------

             Summary: Livy R plot does not allow to define size of plot
                 Key: LIVY-433
                 URL: https://issues.apache.org/jira/browse/LIVY-433
             Project: Livy
          Issue Type: Bug
    Affects Versions: 0.4
         Environment: HDP
            Reporter: Matthias


a simple plot does always plot at the same size. 
{code:java}
x = rnorm(10)
plot(x){code}
(480x480, which is the default for the png() function in R).

Probably offending code :

[https://github.com/apache/incubator-livy/blob/c1aafeb6cb87f2bd7f4cb7cf538822b59fb34a9c/repl/src/main/scala/org/apache/livy/repl/SparkRInterpreter.scala#L199]
{code:java}
// Create a image file if this command is trying to plot.
val tempFile = PLOT_REGEX.findFirstIn(code).map { case _ =>
val tempFile = Files.createTempFile("", ".png")
val tempFileString = tempFile.toAbsolutePath
code = f"""png("$tempFileString")\n$code\ndev.off()"""
tempFile
}{code}
 

ideally this should be parametrized to allow custom plot-sizes.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)