Skip to content

Commit

Permalink
auto exponentiation scatterplot axes
Browse files Browse the repository at this point in the history
  • Loading branch information
alkaZeltser committed Jun 18, 2024
1 parent aec2d05 commit b56b938
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions R/plot-pgs.R
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,8 @@ create.pgs.with.continuous.phenotype.plot <- function(
scatter.ylimits <- NULL;
}

xaxis.formatting <- auto.axis(pgs.data[ , pgs.column], log.scaled = FALSE, num.labels = 5, include.origin = FALSE);
yaxis.formatting <- auto.axis(pgs.data[ , phenotype], log.scaled = FALSE, num.labels = 5, include.origin = FALSE);
pgs.scatterplots[[paste0(pgs.column,'_',phenotype)]] <- BoutrosLab.plotting.general::create.scatterplot(
formula = as.formula(paste0(phenotype, ' ~ ', pgs.column)),
data = pgs.data,
Expand All @@ -485,6 +487,10 @@ create.pgs.with.continuous.phenotype.plot <- function(
ylab.label = phenotype,
main = '',
main.cex = 0,
yat = yaxis.formatting$at,
yaxis.lab = yaxis.formatting$axis.lab,
xat = xaxis.formatting$at,
xaxis.lab = xaxis.formatting$axis.lab,
# Correlation Legend
legend = correlation.legend,
ylimits = scatter.ylimits,
Expand Down

0 comments on commit b56b938

Please sign in to comment.