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 functions refactoring #8

Open
azadsadr opened this issue Jun 26, 2024 · 3 comments
Open

plot functions refactoring #8

azadsadr opened this issue Jun 26, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@azadsadr
Copy link
Collaborator

all the plot function in basilica must return the ggplot object (not patchwork), which make it easy to manage visualization tuning afterwards. So, all the function returning multiple plots must handle the case by adding extra parameters to choose one of the plots at the time.

@azadsadr azadsadr added the enhancement New feature or request label Jun 26, 2024
@elena-buscaroli
Copy link
Collaborator

elena-buscaroli commented Jun 26, 2024

Please report the functions you would like to improve. @azadsadr

@azadsadr
Copy link
Collaborator Author

azadsadr commented Jun 26, 2024

the functions are as follow:

  • plot_gradient_norms
  • plot_scores
  • plot_QC(x)
  • plot_fit
  • plot_data
  • plot_data_differences
  • plot_signatures
  • plot_similarity_reference
    PS: if found other functions please add to the list
    PS: it can be done using the template e.g., plot_scores(x, what="nmf", which="likelihood")

@caravagn
Copy link
Collaborator

Logic: in order to allow full customizability of the output plots, it is better that all plotting functions return a ggplot object and that the caller, if required, will assembly stuff using his/her favourite tool (patchwork, ggpubr etc).

I suggest however to limit the number of plotting functions using the format

top_level_plot(x, what="XXX", which="YYY")

that might use internal plotting functions of the form private_plot_X_Y.

See an example here: https://github.com/caravagnalab/CNAqc/blob/master/R/plot_data_histogram.R

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

No branches or pull requests

3 participants