How to turn off my map gridlines?

Based on the menu, I would need to do this:
Select gridline or pixel node registration.

In Julia, what would be the input argument to my grdimage, if my goal is to turn off the longitude and latitude gridlines?

Many thanks!

Believe me, I already called your attention to it, this is really important knowledge to those who create grids and it’s not GMT specific. All grids are either gridline or pixel registered, though in other places this have different names (e.g. in GeoTIFF tags). It has nothing to do with map grid lines, which is controlled by the frame (-B in GMT) option.

1 Like

Many thanks, Joaquim. Good to learn that new piece of information.

I’m able to use the below to control the intervals of my map gridlines now:
frame=(annot=30, grid=30)

Unfortunately, I’m unable to figure out the answers to these two questions:

  1. Is it possible to specify annot and grid values for the longitude and latitude axes separately?
  2. How do I change my gridline type from solid line to dotted line?

Tell me honestly, have you read this docs and played with examples shown at the end of that section?

I can make another example tailored exactly for this question but you’ll agree that I can’t keep doing this to all the questions.

Thanks, Joaquim.

I absolutely did, although not closely enough. Now I’m able to solve Question #1 myself:
xaxis=(annot=30, grid=30), yaxis=(annot=15, grid=15)

For my Question #2, I did some searching and find the below solution:
Add --GRID_PEN_PRIMARY =0.25p,.

So for Julia, I would need something like the below? Unfortunately, it does not work.

Man, but that is in the examples of that section. Use the option par, or conf

basemap(region=[0 1000 0 1000], figsize=5,
        frame=(axes=(:left_full,:bottom_full,:right_full,:top_full), annot=200,
               ticks=100, xlabel=:horizontal, ylabel=:vertical),

and in

Themes is another interesting option, though I’m risking a lot by pointing you to another module.

1 Like

Many thanks!

The below keeps giving me the error of UndefVarError: p not defined

That said, this is a very minor issue that I can live with.

Off course p it’s not defined. You didn’t define it. This is pure Julia syntax. Should be par=(GRID_PEN_PRIMARY="0.25p",). Note the trailing comma.

1 Like

Many thanks! :+1: Just one minor correction for future reference. The correct argument should be: MAP_GRID_PEN_PRIMARY="0.25p",
It seems that the old way of using GRID_PEN_PRIMARY has been deprecated. It did not work with my GMT version 6.2.0.

BTW, the trailing comma is very interesting :grinning: