Commit b7be06a5 authored by Rui Vieira's avatar Rui Vieira

Release 0.0.4

parent 56b08128
......@@ -3,7 +3,7 @@ FROM openjdk:10.0.1-10-jdk
RUN apt-get update
RUN apt-get install -y python3-pip
RUN pip3 install --no-cache-dir notebook==5.5.* jupyterlab==0.32.* tornado==5.1.1
RUN pip3 install --no-cache-dir notebook==5.5.* jupyterlab==0.32.* tornado==5.1.1 matplotlib
USER root
......
......@@ -6,7 +6,7 @@
<groupId>org.ruivieira</groupId>
<artifactId>java-plotlib</artifactId>
<version>0.0.3</version>
<version>0.0.4</version>
<build>
<plugins>
......
......@@ -11,6 +11,8 @@ import static org.apache.commons.io.FileUtils.writeStringToFile;
public class Figure {
private String python = "/usr/local/bin/python3";
private Optional<String> title = Optional.empty();
public StringBuilder script = new StringBuilder();
......@@ -38,7 +40,7 @@ public class Figure {
script.append("\n").append("plt.savefig('").append(imageName).append("')");
writeStringToFile(tempFile, script.toString(), Charset.defaultCharset());
// System.out.println(script.toString());
runtime.exec("/usr/local/bin/python3 " + tempFile.getAbsolutePath());
runtime.exec(python + " " + tempFile.getAbsolutePath());
System.out.println(tempFile.getAbsolutePath());
} catch (IOException e) {
......@@ -58,4 +60,12 @@ public class Figure {
}
return img;
}
public String getPython() {
return python;
}
public void setPython(String python) {
this.python = python;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment