Git Product home page Git Product logo

Comments (2)

davismcc avatar davismcc commented on August 24, 2024

Hi Ryan and @taeyoungh,

I've noticed this same behaviour recently. rmote is working perfectly for "simple" ggplot objects (i.e. just one plot, whatever the style) and for base R plots (with plot_done). However, for more complicated objects made up of several individual plots it won't show any plot at the localhost page. I've seen this for heatmaps (both with the pheatmap and superheat packages) and for multiple plots with plot_grid from the cowplot package.

For example, if I have two ggplot objects p1 and p2, they plot as expected individually, but not with plot_grid:

R> p1
 serving graphics through rmote
 Picking joint bandwidth of 2.15
 making thumbnail
 R> p2
 serving graphics through rmote
 Picking joint bandwidth of 2.04
 making thumbnail
!R> plot_grid(p1, p2)
 Picking joint bandwidth of 2.15
 Picking joint bandwidth of 2.04
 - not sending to rmote because another graphics device has been opened...
 - sending to the open graphics device instead...

Is this a known issue? Is there a workaround that can be applied?

Until I recently updated to R 3.4.3 and updated other packages (thinking especially of cowplot here) plot_grid worked fine, so maybe something changed in cowplot?

I love the package - if we could get it working for these compound plots then it would be just about perfect. If there's anything we can do to help, I'd be happy to.

Best,
Davis

from rmote.

r2evans avatar r2evans commented on August 24, 2024

It is likely related that this doesn't work with grid.arrange plots. Not sure if it's the non-default grobs that don't work.

dev.list()
# NULL
library(ggplot2)
library(gridExtra)
plot1 <- qplot(carat, data = diamonds, geom = "histogram", binwidth = 1)
plot2 <- qplot(carat, data = diamonds, geom = "histogram", binwidth = 0.1)
plot3 <- qplot(carat, data = diamonds, geom = "histogram", binwidth = 0.05)
grid.arrange(plot1, plot2, plot3, ncol=3)
dev.list()
# pdf
#   2

qplot(carat, data = diamonds, geom = "histogram", binwidth = 0.05)
# - not sending to rmote because another graphics device has been opened...
# - sending to the open graphics device instead...
# - to send to rmote, close all active graphics devices using graphics.off()
graphics.off()
qplot(carat, data = diamonds, geom = "histogram", binwidth = 0.05)
# works again

There have been no commits since mid-2017. @hafen, is there an intention to continue fixes/development on this package?

from rmote.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.