GithubHelp home page GithubHelp logo

Unable to change effsize.ylim about dabestr HOT 3 CLOSED

acclab avatar acclab commented on September 2, 2024
Unable to change effsize.ylim

from dabestr.

Comments (3)

josesho avatar josesho commented on September 2, 2024

Hi,

I would suggest using a Cumming plot rather than two Gardner-Altman plots to achieve what you want.

all.data <- tibble::tibble(Control1 = cont1, Treatment1 = treat1,
                           Control2 = cont2, Treatment2 = treat2)

all.data.tidy <-
  all.data %>%
  tidyr::gather(key = Group, value = Measurement)

dabest.all.data <- 
  all.data.tidy %>%
  dabest(Group, Measurement,
         idx = list(c("Control1", "Treatment1"),
                    c("Control2", "Treatment2")),
         paired = FALSE)

plot(dabest.all.data)

cumming_demo

If, however, you want two Gardner-Altman plots, then what you have done above (setting rawplot.ylim) works. The nature of the Gardner-Altman plots is such that one can only set the ylims for the rawdata plot (on the left); the axes with the effect size and confidence interval is, by design, aligned to the axes on the left and currently cannot be set.

from dabestr.

josesho avatar josesho commented on September 2, 2024

Another question: how do I change the scale interval (for example, by 5, not 10). Thanks!

To the best of my knowledge, this is effectively not possible now. (We use cowplot to stitch the raw swarmplot with the effect size plot. You might be able to isolate the axes, and then use ggplot's scale_y_continuous to set the tick breaks, but I'm not sure how yet.)

from dabestr.

silasprincipe avatar silasprincipe commented on September 2, 2024

Thanks @josesho !

from dabestr.

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.