Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions R/splnr_plotting.R
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,10 @@ splnr_plot <- function(df,
) +
ggplot2::guides(fill = ggplot2::guide_colourbar(
order = -1,
barwidth = ggplot2::unit(2, "lines"),
barheight = ggplot2::unit(10, "lines"),
title.position = "right",
title.theme = ggplot2::element_text(angle = 270)
title.theme = ggplot2::element_text(angle = 270, vjust = 0.5)
))

return(gg)
Expand Down Expand Up @@ -270,8 +272,10 @@ splnr_plot <- function(df,
ggplot2::guides(
fill = ggplot2::guide_colourbar(
order = 1,
barwidth = ggplot2::unit(2, "lines"),
barheight = ggplot2::unit(10, "lines"),
title.position = "right",
title.theme = ggplot2::element_text(angle = 270)
title.theme = ggplot2::element_text(angle = 270, vjust = 0.5)
),
colour = "none"
)
Expand Down Expand Up @@ -669,7 +673,7 @@ splnr_plot_costOverlay <- function(soln,
barwidth = ggplot2::unit(2, "lines"),
barheight = ggplot2::unit(10, "lines"),
title.position = "right",
title.theme = ggplot2::element_text(angle = 270)
title.theme = ggplot2::element_text(angle = 270, vjust = 0.5)
)
) +
# Set coordinate limits based on the bounding box of the cost data.
Expand Down Expand Up @@ -1165,8 +1169,10 @@ splnr_plot_importanceScore <- function(soln,
labels = lab, # Apply custom labels.
guide = ggplot2::guide_colourbar( # Configure color bar legend.
title = legendTitle, # Set legend title.
barwidth = ggplot2::unit(2, "lines"),
barheight = ggplot2::unit(10, "lines"),
title.position = "right",
title.theme = ggplot2::element_text(angle = 270)
title.theme = ggplot2::element_text(angle = 270, vjust = 0.5)
)
) +
# Set coordinate limits based on the bounding box of the scored solution.
Expand Down Expand Up @@ -1330,9 +1336,10 @@ splnr_plot_corrMat <- function(x, colourGradient = c("#BB4444", "#FFFFFF", "#447
limits = c(-1, 1), # Set fixed limits for the color scale.
guide = ggplot2::guide_colourbar( # Configure color bar legend.
title = legendTitle, # Set legend title.
barwidth = 2, barheight = 10, # Set dimensions of the color bar.
barwidth = ggplot2::unit(2, "lines"),
barheight = ggplot2::unit(10, "lines"),
title.position = "right",
title.theme = ggplot2::element_text(angle = 270)
title.theme = ggplot2::element_text(angle = 270, vjust = 0.5)
)
) +
# Rotate x-axis labels for better readability.
Expand Down
Loading