Giter Site home page Giter Site logo

Long labels about ouch HOT 5 CLOSED

kingaa avatar kingaa commented on July 21, 2024
Long labels

from ouch.

Comments (5)

kingaa avatar kingaa commented on July 21, 2024 1

Happy to consider pull requests with documentation changes, as well as additional plotting options. It might also be good to add additional data sets. The primates data you sent earlier is sitting on the repo now, but not included in the package. Not sure if it is a good one.

from ouch.

kingaa avatar kingaa commented on July 21, 2024 1

One thing to keep in mind in this is that ouch is deficient in unit tests. With each proposed change, it would be good to include tests (in the tests directory) that test the new functionality.

from ouch.

kingaa avatar kingaa commented on July 21, 2024

Getting the width of strings right is complicated: it depends on the font, the specific letters, etc. I looked into it awhile back and came away shaking my head. How about just giving the user an option (say, labelwidth, default = 0.1) which specifies the width of the label panels. A bit of trial-and-error will then get it right.

from ouch.

mbutler808 avatar mbutler808 commented on July 21, 2024

Sure, that would work too!
I would like to update the help pages to provide more examples and explanation. Would you be OK with that? I saw that it is now autogenerated from Roxygen, so I will have to study that first. M

from ouch.

kingaa avatar kingaa commented on July 21, 2024

Using the plotting branch, I can do the following. Is this an improvement? I'm not sure: seems a lot of clunkiness just to adjust label widths.

with(bimac,ouchtree(node,ancestor,time,species)) -> tr
plot(tr)
plot(tr,text_opts=list(cex=1,pos=4))
plot(tr,text_opts=list(cex=0.5,pos=4))

bimac$silly <- ifelse(
  is.na(bimac$species),
  NA_character_,
  "anamagrophilexitudinousityarpificationesqueness"
)

with(bimac,ouchtree(node,ancestor,time,silly)) -> tr
plot(tr,text_opts=list(pos=4))
plot(tr,text_opts=list(cex=0.5,pos=4))

with(bimac,ouchtree(node,ancestor,time/max(time),silly)) -> tr
plot(tr,text_opts=list(pos=4))
plot(tr,text_opts=list(cex=0.5,pos=4))

from ouch.

Related Issues (7)

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.