Open ndrubins opened 5 years ago
The system command error from processx::run likely means that orca is failing for some reason, which could be due to permissions. Can you try running the below code and let me know the output?
system("orca")
system("where orca")
Sure.
For system("orca")
I get:
Plotly's image-exporting utilities
Usage: orca [--version] [--help] <command> [<args>]
Available commands:
- graph [or plotly-graph, plotly_graph]
Generates an image of plotly graph from inputted plotly.js JSON attributes.
For more info, run `orca graph --help`.
- serve [or server]
Boots up a server with one route per available export component
For more info, run `orca serve --help`.
where orca
is not defined:
> system("where orca")
sh: where: command not found
Warning message:
In system("where orca") : error in running command
Perhaps which orca
helps:
> system("which orca")
/usr/local/bin/orca
It looks like orca is set up properly from your output, what if you tried the following from the unix command line,
orca graph '{ "data": [{"y": [1,2,1]}] }' -o fig.png
You can also use the system() function to run the same from R if you would like. Let me know if that works with no errors.
@ndrubins I was able to replicate your issue.
(@Haunfelder I don't think this has anything to do with configuring the orca
CLI).
This is gonna be a difficult issue to track down, but just FYI, you can specify debug = T
in orca()
to get some more info:
export error 422 for heatmap.plot - json parse error
undefined
I might not have the bandwidth to investigate further. If you wanted, you could report an issue over at https://github.com/plotly/orca or https://github.com/plotly/plotly.js. If you do, first use plotly_json()
to write the relevant JSON to file:
R> plotly_json(heatmap.plot, FALSE) %>% cat(file = "graph.json")
Then provide a link to the JSON and a shell command to replicate the issue:
shell> orca graph graph.json -o fig.pdf --debug
Thanks a lot @cpsievert.
Just to confirm, indeed orca graph '{ "data": [{"y": [1,2,1]}] }' -o fig.png
from my command land does not throw any error message.
I'll follow your advice and report an issue at (https://github.com/plotly/orca) or (https://github.com/plotly/plotly.js).
Hi,
I'm creating a
heatmap
image. If I try to combine it with a columndendrogram
, although it is viewable on theRStudio
viewer, usingorca
to export it aspdf
fails .Here's an example where I build a sparse
heatmap
and add to it a columndendrogram
:As mentioned above, I'm able to view the image of the
heatmap
+dendrogram
on theRStudio
viewer. However, when I try to save it to apdf
using:plotly::orca(p, file="p.pdf")
I get the error:The failure of exporting a heatmap to a
pdf
usingorca
is not specific to the example above though.In the example below I'm creating a big heatmap (1862 x 2511) with long row and column labels and it also fails:
The heatmap is facetted by columns, so first I create a data.frame fr guiding the facets:
Now I create a list of heatmap plots, one per each facet:
Now I combine the facet plots to a single plot:
heatmap.plot <- plotly::subplot(plot.list,shareX=T,shareY=T,nrows=1,margin=0.001,widths=rep(1/nrow(facet.df),nrow(facet.df))) %>% layout(showlegend=F)
Finally, trying to export the plot usingorca
: ` plotly::orca(heatmap.plot %>% plotly::style(hoverinfo = 'none'),file="heatmap.plot.pdf")`
Fails with:
Thanks a lot.