I’ve recently had my first encounter with PyGMT and I’m excited to delve into its capabilities for crafting visualizations. Given my newcomer status, I’ve encountered a few customization challenges. As these inquiries seem straightforward, I’ve chosen to group them under a single topic to streamline the discussion.
Despite consulting the documentation, I’m unable to find the necessary details for the following:
How can I adjust gridline properties, such as line(pen?) color and linewidth?
I’m interested in changing the grid direction labels to localized versions. For example, I’d like to use ‘O’ (Portuguese - Oeste) instead of ‘W’ for West.
I’m seeking assistance with personalizing the scalebar’s appearance. I aim to modify its height, segment count, and style. Despite my efforts, I couldn’t locate instructions on this in the documentation.
Hi @Robson, welcome to the forum! To quickly answer your questions:
This can be set with the MAP_GRID_PEN config. There is also MAP_GRID_PEN_PRIMARY and MAP_GRID_PEN_SECONDARY to further configure the primary and secondary grids if needed.
Hopefully that’s enough to get you started! In general, you’ll need to learn how to jump from the PyGMT documentation to the GMT documentation for more advanced customizations (tip: look at the ‘Full option list …’ link in most PyGMT API documentation pages), but hopefully you’ll get the hang of it soon! Let us know if you have any other questions, and feel free to start another forum thread if needed.