Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plot Aesthetics #148

Open
JJRAINE opened this issue Sep 21, 2023 · 1 comment
Open

Plot Aesthetics #148

JJRAINE opened this issue Sep 21, 2023 · 1 comment

Comments

@JJRAINE
Copy link

JJRAINE commented Sep 21, 2023

Hi,

I've run into an issue attempting to add black outlines to the swarm plot points while maintaining a color palette. My original plot* generates normally as below (Test1), however attempting to add the black outline seems to override the color palette (Test 2). Instructing it to fill with a single color works (Test 3), however I'm unable to fill with a palette. Providing multiple colors returns the 'Error in Fortify' below (Test). Any assistance would be much appreciated, thanks!

*The data for this plot and creation of the cliffs delta object is available as an attachment

Test1 <- plot(CLIFFSWT20,
color.column = TIME,
palette = "Reds",
rawplot.markersize = 1.8,
effsize.markersize = 1.5, effsize.ylim = c(-1, 1))
Test1
image

Test2 <- plot(CLIFFSWT20,
swarmplot.params = list(mapping = aes(fill = TIME, color = TIME),
color = "black", pch = 21, size = 3),
color.column = TIME,
palette = "Reds",
rawplot.markersize = 1.8,
effsize.markersize = 1.5, effsize.ylim = c(-1, 1))
Test2
image

Test3 <- plot(CLIFFSWT20,
swarmplot.params = list(mapping = aes(fill = TIME, color = TIME),
fill = "red", color = "black", pch = 21, size = 3),
color.column = TIME,
palette = "Reds",
rawplot.markersize = 1.8,
effsize.markersize = 1.5, effsize.ylim = c(-1, 1))
Test3
image

Test4 <- plot(CLIFFSWT20,
swarmplot.params = list(mapping = aes(fill = TIME,),
fill = "red","blue","green",color = "black", pch = 21, size = 3),
color.column = TIME,
rawplot.markersize = 1.8,
effsize.markersize = 1.5, effsize.ylim = c(-1, 1))
Test4

Error in fortify():
! data must be a <data.frame>, or an object coercible by fortify(), not the string "blue".
Backtrace:

  1. base::plot(...)
  2. dabestr:::plot.dabest_effsize(...)
  3. ggbeeswarm (local) <fn>(...)
  4. ggplot2::layer(...)
  5. ggplot2:::fortify.default(data)

CSVs for R.csv
CLIFFSWT20 <- dabest(CSVs_for_R, TIME, Tin,
idx = unique(reodata$TIME),
paired = FALSE) %>%
cliffs_delta()

@sunroofgod
Copy link
Collaborator

Hi @JJRAINE ,

We've recently released a new version of dabestr, 
“Lapis” (v2023.9.12), which adds estimation graphics for four new data types: repeated measures, 2 × 2 designs, proportions, and easy meta-analyses.

dabestr version “Lapis” is a complete rebuild of the original dabestr and as such, unfortunately, v0.3.0 of dabestr and below are now deprecated and will no longer be receiving support.

We strongly recommend upgrading to the latest version (“Lapis”) as soon as possible. This will not only ensure access to the latest features but also expedite the resolution of any issues you may have encountered.

You can find the latest release here and the updated documentation for the package here.

For quick installation, you may refer to the following:

# Install it from CRAN
install.packages("dabestr")

# Or the development version from GitHub:
# install.packages("devtools")
devtools::install_github(repo = "ACCLAB/dabestr", ref = "dev")

If you face any challenges during the update process or have further questions, please don't hesitate to reach out.

We value your feedback and appreciate your continued support!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants