Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in
  • E esviz
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 16
    • Issues 16
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 4
    • Merge requests 4
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Earth SciencesEarth Sciences
  • esviz
  • Merge requests
  • !36

Parameters for adjusting plot and color bar margins in VizMostLikelyQuantileMap.R

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged abatalla requested to merge dev-MostLikely_size_adjustments into main Jul 18, 2025
  • Overview 0
  • Commits 4
  • Pipelines 2
  • Changes 3

Hi @nperez and @vagudets,

This MR adds two parameters to VizMostLikelyQuantileMap() (margin_scale and bar_extra_margin), that were previously accessible through ... and defined in VizCombinedMap(). These parameters control the plot margins and the spacing around the color bar, addressing a longstanding issue of the color bar appearing too thin by default when the grid cells were square. Making them explicit in VizMostLikelyQuantileMap() avoids requiring users to read the documentation of an internal function.

  • margin_scale: plot margins
#'@param margin_scale Numeric vector of length 4 specifying the plot margins 
#'  (excluding the color bar), in the order: bottom, left, top, and right. If 
#'  not specified (NULL), the default margins from \code{par("mar")}, which are 
#'  c(5.1, 4.1, 4.1, 2.1), are used. Default is NULL.

Screenshot_from_2025-07-17_15-21-04 Screenshot_from_2025-07-17_15-22-45

  • bar_extra_margin: color bar margins
#'@param bar_extra_margin Numeric vector of length 4 specifying the margins to 
#'  be added around the color bar, in the order: bottom, left, top, and right. 
#'  The units are margin lines. The default values are c(1.5, 0, 1.5, 0).

Screenshot_from_2025-07-17_15-20-45 image

I have set the default of bar_extra_margin to c(1.5, 0, 1.5, 0) instead of c(2, 0, 2, 0) (default in VizCombinedMap), to make the color bar slightly thicker by default.

Let me know any thoughts you have on this.

Thank you,

Ariadna

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: dev-MostLikely_size_adjustments