jpquast / ggplate

Create Layout Plots of Biological Culture Plates and Microplates
https://jpquast.github.io/ggplate/
Other
90 stars 6 forks source link

plate direction #4

Closed oclaisse closed 11 months ago

oclaisse commented 1 year ago

Hello, thanks for this new Package. I tried to run it but the output plate is inverted. Line A is below instead of above. I can’t find how to edit, can you help me solve this problem?

jpquast commented 1 year ago

Thanks for posting the issue. I have not seen this before while testing. Could you maybe share your input data frame and code that you run. If I can reproduce it I can fix it.

You can easily turn your input data into code using dput(mydata). Then you can use the {reprex} package to post a reproducible example here. Check the Usage section of the reprex documentation (https://github.com/tidyverse/reprex)

oclaisse commented 1 year ago

Hello, I have run the demo data and attach the ouput

local({pkg <- select.list(sort(.packages(all.available = TRUE)),graphics=TRUE)

  • if(nchar(pkg)) library(pkg, character.only=TRUE)}) Welcome to ggplate version 0.0.1!

Have fun plotting your data! Message d'avis : le package ‘ggplate’ a été compilé avec la version R 4.1.3

Load a dataset of continuous values for a 96-well plate

data(data_continuous_96)

Check the structure of the dataset

str(data_continuous_96) Classes ‘tbl_df’, ‘tbl’ and 'data.frame': 96 obs. of 2 variables: $ Value: num 1.19 0.88 0.17 0.85 0.78 0.23 1.95 0.4 0.88 0.26 ... $ well : chr "A1" "A2" "A3" "A4" ...

Create a 96-well plot with round wells

plate_plot( data = data_continuous_96, position = well, value = Value, plate_size = 96, plate_type = "round" )

De: "Jan-Philipp Quast" @.> À: "jpquast/ggplate" @.> Cc: "Olivier Claisse" @.>, "Author" @.> Envoyé: Lundi 23 Janvier 2023 15:50:36 Objet: Re: [jpquast/ggplate] plate direction (Issue #4)

Thanks for posting the issue. I have not seen this before while testing. Could you maybe share your input data frame and code that you run. If I can reproduce it I can fix it.

You can easily turn your input data into code using dput(mydata) . Then you can use the {reprex} package to post a reproducible example here. Check the Usage section of the reprex documentation ( [ https://github.com/tidyverse/reprex | https://github.com/tidyverse/reprex ] )

— Reply to this email directly, [ https://github.com/jpquast/ggplate/issues/4#issuecomment-1400478880 | view it on GitHub ] , or [ https://github.com/notifications/unsubscribe-auth/AXUIJN5VR5AOLDIRVMLAQOLWT2LDZANCNFSM6AAAAAAUD3WBBQ | unsubscribe ] . You are receiving this because you authored the thread. Message ID: @.***>

jpquast commented 1 year ago

For me this produces the following output:

library(ggplate)
#> Welcome to ggplate version 0.0.1!
#>                             
#> Have fun plotting your data!

# Load a dataset of continuous values for a 96-well plate
data(data_continuous_96)

# Check the structure of the dataset
str(data_continuous_96)
#> tibble [96 × 2] (S3: tbl_df/tbl/data.frame)
#>  $ Value: num [1:96] 1.19 0.88 0.17 0.85 0.78 0.23 1.95 0.4 0.88 0.26 ...
#>  $ well : chr [1:96] "A1" "A2" "A3" "A4" ...

# Create a 96-well plot with round wells
plate_plot(
  data = data_continuous_96,
  position = well,
  value = Value,
  plate_size = 96,
  plate_type = "round"
)

Created on 2023-01-24 by the reprex package (v2.0.1)

Maybe the issue are outdated R packages or R itself. Maybe try to see if updating packages and R resolves the issue. It could be that the functionality that reverses the axis was introduced in a later version of {ggplot2} than what you have installed.