Closed MichaelChirico closed 4 years ago
You might want to try different browsers. There's a button in Rstudio to open in your default browser and you can copy the url to a different browser. In my case Internet explorer worked than chrome. Can you please test on the browsers you have and report ?
There is actually a zoom argument that you can play with (pass through the ...
) but I think its effect depends on browser too.
I think it would really make sense to be able to chunk big charts, especially those that take a lot of horizontal space, but I need to figure out the heuristics, parameters, and how to display it.
Hmm I was looking for a button to open in browser but I didn't get anywhere:
Export allows me to save as a webpage but (in Chrome/Safari at least) that page didn't offer any zoom either :\
Open in browser is the last icon on the right in your last image. Though I guess it won't help you much here.
Maybe I can also save it through code to a big svg image
Oh, I see, thanks. The hover-over said "Open in new window" which threw me off. For Shiny e.g. it explicitly says "Open in browser".
Again, not sure the implementation complexity, but I've found PDF more satisfying for this type of thing in terms of output.
Can you update the package and try this ?
tf_foverlaps <- tempfile(fileext = ".png")
tf_dcast <- tempfile(fileext = ".png")
view_flow(data.table::foverlaps, png = tf_foverlaps)
view_flow(data.table:::dcast.data.table, png = tf_foverlaps)
browseURL(tf_foverlaps)
browseURL(tf_dcast)
Still no luck with [.data.table
, it doesn't error but doesn't write the file either, not sure if the issue comes from nomnoml, htmlwidgets or webshot, or me :), possibly a combination.
Nice! looking great
PS heads up that this one makes a suggested system dependency binding:
PhantomJS not found. You can install it with webshot::install_phantomjs(). If it is installed, please make sure the phantomjs executable can be found via the PATH variable.
Do you suggest I should do something to deal with this better ? If so, what should I do ?
splitting the chart has its own issue : https://github.com/moodymudskipper/funflow/issues/10
Do you suggest I should do something to deal with this better
No, it's just an FYI. The error message is quite helpful already.
foverlaps doesn't display right anymore because of https://github.com/moodymudskipper/funflow/issues/11
i.e. some if calls, and the function itself, never reach their end because there are return()
or stop()
calls at the end of both yes
and no
branches.
I think it shows the truth however, only polluted by some additional "end" blocks.
I don't think I can do much better than this about zooming but keeping this open until :
tf <- tempfile(fileext = ".png"); view_flow(fun, png = tf); browseURL(tf)
and howWe have the options zoom, height and width that are forwarded to nomnoml, and nomnoml can also in principle prints to svg but I can't get any of those to work, at least they don't change things for the better.
A range argument to the function flow_view (a rework of view_flow, which will disappear) has a range argument allowing to choose a starting and finishing block.
for instance flow_view(data.table::foverlaps, range = 17:36)
or flow_html(data.table::foverlaps, range = 17:36)
to create an html page
opening several of them makes it convenient to examine the logic of the function.
But still it's some work to determine the cutpoints.
We can do better by :
This way even a huge function could be split without much manual tweaking, and be readable right away
@MichaelChirico I believe that now we have good ways to zoom. A range argument allows you to focus on some part, one can easily export in different formats (including html containing svg, to adress the vector graphics query, by setting svg=TRUE).
Using flow_run with trim = TRUE can also help.
It might be improved further later but closing for now.
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.
Have some issues seeing details on our more complicated functions (e.g.
data.table::foverlaps
&data.table:::dcast.data.table
)Would be great to zoom!