Closed erex closed 4 years ago
Yes - graphviz needs to be installed. There are other dependencies depending on the output format, notably pdf.
This seems to be a problem with the Ghostscript installation / grImport package. I assume, this is a problem in grImport. Could you try ´library(grImport)´ and see if that works?
No success:
library(plantuml)
> x <- '
+ (*) --> "Initialization"
+
+ if "Some Test" then
+ -->[true] "Some Activity"
+ --> "Another activity"
+ -right-> (*)
+ else
+ ->[f .... [TRUNCATED]
> x <- plantuml(
+ x
+ )
> library(grImport)
Loading required package: grid
Loading required package: XML
> plot(x)
Error in grImport::PostScriptTrace(file = fn, outfilename = fnrgl) :
status 127 in running command 'gswin32c.exe -q -dBATCH -dNOPAUSE -dNOSAFER -sDEVICE=ps2write -sOutputFile=C:\Users\erexs\AppData\Local\Temp\RtmpuwQJVJ\file484848456c21 -sstdout=C:\Users\erexs\AppData\Local\Temp\RtmpuwQJVJ\file48485f561d39.rgml C:\Users\erexs\AppData\Local\Temp\RtmpuwQJVJ\file484878094897.ps'
This is a grImport
proble. See e.g. https://stackoverflow.com/questions/35256501/windows-rgrimport-ghostscript-error-status-127
status 127 seems to indicate, that the command has not been found. So it is a problem with the Ghostscript installation or the grImport
package. I have no idea why this is happening - please enquire with the maintainer of grImport or on stackexchange.
Sorry about this.
I have no past experience with Ghostscript being on a Windows box. I note with interest there is a package grImport2
.
Meanwhile, given I can successfully produce output, I'm not too bothered.
Good.
grImport2
works with svg files - not eps. It was easier to work with eps, as for the svg files, an additional dependency is needed. But you can circumvent all this by using the knit engine supplied - check out the issue #10 for a discussion. It works now.
grImport is only used to display the graph in a graphics device.
Sorry - issue #10
Running in Windows 10. Followed
plantuml
installation instructions, includingupdatePlantumlJar()
, but received error message (in RStudio viewer window) that graphviz needed to be installed.After doing so, diagram successfully created (message about graphvis in background of viewer window): but only if argument
vector
is set to FALSE inplot(x, vector=FALSE)
. Otherwise this error is returned to console:I now see this comment in
readme.md
It would be nice if there could be a more gentle failure of the plot function.