Skip to content

Commit

Permalink
Merge branch 'develop' into 473-tada_twocharacteristicscatterplot-leg…
Browse files Browse the repository at this point in the history
…end-should-not-include-fraction-andor-speciation-if-they-are-na
  • Loading branch information
cristinamullin authored Jun 13, 2024
2 parents 4ce296c + 0198934 commit 2178ddd
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions R/DepthProfile.R
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,6 @@ TADA_DepthProfilePlot <- function(.data,
" and ",
param3$TADA.CharacteristicName[1],
" for ",
# figure out addition of weird \n in name
plot.data$MonitoringLocationName[1],
" on ",
format(as.Date(plot.data$ActivityStartDate[1]), "%B %d, %Y")
Expand Down Expand Up @@ -1075,8 +1074,10 @@ TADA_DepthProfilePlot <- function(.data,

# figure margin
mrg <- list(
l = 50, r = 50,
b = 100, t = 75,
l = 50,
r = 50,
b = 100,
t = (25 + (ceiling(nchar(title)/50)) * 25), # top margin is variable based on number of lines in title
pad = 0
)

Expand Down Expand Up @@ -1109,7 +1110,10 @@ TADA_DepthProfilePlot <- function(.data,
autorange = "reversed"
),
hoverlabel = list(bgcolor = "white"),
title = title,
title = list(
text = title,
xref = "paper",
x = 0.5),
plot_bgcolor = "#e5ecf6",
margin = mrg,
legend = list(
Expand Down Expand Up @@ -1354,8 +1358,10 @@ TADA_DepthProfilePlot <- function(.data,
# adjust margins of plot
scatterplot <- scatterplot %>%
plotly::layout(margin = list(
l = 50, r = 100,
b = 100, t = 75,
l = 50,
r = 100,
b = 100,
t = (25 + (ceiling(nchar(title)/50)) * 25),
pad = 0
))

Expand Down

0 comments on commit 2178ddd

Please sign in to comment.