Code Monkey home page Code Monkey logo

Comments (4)

willgearty avatar willgearty commented on August 23, 2024

Hmm...when I run your code line for line, I get Error in FUN(X[[i]], ...) : object 'x' not found, as you do for your other script.
I've tried the code without the new "fill_geo_scale", and I'm still getting the same error:

> tree<-pbtree(n=16,tip.label=LETTERS[1:16],scale=20)
> p <- ggtree(tree, size = 0.3) + 
  coord_cartesian(xlim = c(15,-30), ylim = c(-40,Ntip(tree)), expand = FALSE) +
  scale_x_continuous(breaks=seq(-30,0,10), labels=abs(seq(-30,0,10))) +
  geom_tiplab(cex = 0.7) +
  theme_tree2()
> p <- revts(p)
> p + geom_rect(data = periods, aes(xmin = min_age, xmax = max_age), ymin = 0, ymax = 5, show.legend = FALSE)
Error in FUN(X[[i]], ...) : object 'x' not found

I'm gonna loop @GuangchuangYu in here, since this only appears to be a problem when adding the scale to ggtree objects.
Before the most recent update, the rectangles and labels were added as annotations, but now they are added as geoms, so that is the only change that could have caused the new issue. My best guess is that there's a conflict between the data used by ggtree and the data supplied by my package? Especially since the following works:

> p + geom_rect(xmin = -5, xmax = 0, ymin = -5, ymax = 0, show.legend = FALSE)

from deeptime.

markscherz avatar markscherz commented on August 23, 2024

That sounds possible. ggtree was having some really bad problems interacting with phytools over the last few days as well. I have repeatedly had to clear my environment and clean-sheet to get my other scripts working.

from deeptime.

willgearty avatar willgearty commented on August 23, 2024

@markscherz, until this is resolved you should be able to use the old version of deeptime (before the most recent changes) using the following:
install_github("willgearty/deeptime", ref = "37a00cd")
(I just checked and this works for your example)

from deeptime.

markscherz avatar markscherz commented on August 23, 2024

@willgearty excellent, thanks!

from deeptime.

Related Issues (20)

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.