Skip to content

Missing alias for option -F in basemap #1893

@jackbeagley

Description

@jackbeagley

Description of the problem

I am trying to add a filled background behind my mapscale, similar to the examples in the GMT documentation here: https://docs.generic-mapping-tools.org/dev/cookbook/features.html#placing-map-scales. From what I understand, when adding the map_scale, I should be able to simultaneously add a frame option specifying the fill parameters, like in my example code below, using the options from the GMT documentation. The code below runs when 'frame' isn't specified, but of course no background is generated behind the map_scale. I would be very appreciative if someone could point me in the right direction or let me know if this is in fact a bug. Thanks!

Full code that generated the error

import pygmt

fig = pygmt.Figure()
fig.coast(
    # Set the x-range from 10E to 20E and the y-range to 35N to 45N
    region=[10, 20, 35, 45],
    projection="M12c",
    land="lightgray",
    water="white",
    borders="1/0.5p",
    shorelines="1/0.5p",
    frame="ag",
)
fig.basemap(map_scale='jBR+c36N+w100k+l+f', frame='+p1p+i+gwhite+c0.1i')
fig.show()

Full error message

pygmt.exceptions.GMTCLibError: Module 'basemap' failed with status code 72:
basemap [ERROR]: Option -B: Found frame setting modifiers (+b|g|i|n|o|t|w|x|y|z) mixed with axes settings!
basemap [ERROR]: Option -B parsing failure. Correct syntax:
basemap [ERROR]: Offending option -B+p1p+i+gwhite+c0.1i

System information

Please paste the output of python -c "import pygmt; pygmt.show_versions()":

PyGMT information:
  version: v0.6.1
System information:
  python: 3.9.12 | packaged by conda-forge | (main, Mar 24 2022, 23:24:38)  [Clang 12.0.1 ]
  executable: /opt/homebrew/Caskroom/miniforge/base/bin/python
  machine: macOS-12.3.1-arm64-arm-64bit
Dependency information:
  numpy: 1.22.3
  pandas: 1.4.2
  xarray: 2022.3.0
  netCDF4: 1.5.7
  packaging: 21.3
  geopandas: 0.10.2
  ghostscript: 9.56.1
  gmt: 6.3.0
GMT library information:
  binary dir: /opt/homebrew/Caskroom/miniforge/base/bin
  cores: 10
  grid layout: rows
  library path: /opt/homebrew/Cellar/gmt/6.3.0_2/lib/libgmt.dylib
  padding: 2
  plugin dir: /opt/homebrew/Cellar/gmt/6.3.0_2/lib/gmt/plugins
  share dir: /opt/homebrew/Cellar/gmt/6.3.0_2/share/gmt
  version: 6.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions