-
Notifications
You must be signed in to change notification settings - Fork 361
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement GMT themes (sets of GMT defaults) #3344
Conversation
This will take the name of a separate .conf file that will override the current settings.
Time for some discussion on the themes. I will focus on modern here, and I am doing it via a modern.conf for now. It has the settings below: Note: All of this is open for discussion - I do not consider any of these choices final:
The reasoning behind these are as follows:
Most figures in a paper will fit in a 1-column formatting. Those are something like 8.5 cm wide. Attached is a 8.5 cm pscoast map, first from classic and second with modern:
I can't tell you how many maps like this I have seen in Nature or Science, with their obese map frames. Now, with the modern theme:
I like that the frame and annotations are smaller, and that the ticks are showing. But what happens if I make a plain map:
What I see is that those ticks that worked well with the fancy is way too long for the plain. This is obvious because the lengths are measured from the inside frame and thus they only stick out 2 points with the fancy frame but the full 5 points for plain (minus half the pen width). Since we dont really want to have two settings for tick lengths (fancy vs plain) I think we need to change this to be measured from the outside of the frame, i.e., we subtract the fancy width from the tick length when plain.
This shares the too-long ticks with the plain map, plus I think it is unseemly with all those ticks on the right and top side. It seems better without anything (plain WS):
or with just lines (which is new in GMT 6)
It may be that geo and cart should not have the same default MAP_FRAME_AXES. I am also interested in adding a default for canvas color (inside map frame). MAP_CANVAS_COLOR = none in classic but could be set to something slightly less white in modern. |
OK, some comments.
Still on annotations size. Specially with modern mode cropping out the white areas and automatic display, small figures get displayed on screens with a kind of automatic zoom and for small figures the labels really look too big. Having their size scaled to fig size is really important. |
As @PaulWessel said I'm interested in something like this. currently I'm helping myself with config pages which I include in my scripts. In my eyes @joa-quim has a point with the scaling of the annotations depending on plot size. And I support Paul's idea of different styles for geographic and cartesian plots. There are several different use-cases. You guys currently seem to think only about illustrations in papers/journals. I'm coming from the navigational chart corner where media size is given and reading conditions are usually bad with low light intensity and monochromatic color by night and harsh contrasts/shadows by day. So for me it's more sans-serif fonts. But as I understand it everything from gmt.conf can be configured in theme.conf so I'm happy. NASA has a nice technical report about typography on the flight deck. Using a serif font in modern.conf is funny in my eyes. I would expect a sleek, clean sans-serif design. Maybe I'm biased but I'd prefer something like this:
over this
In my eyes the current version (4551f91) of modern.conf looks somewhat old school. But that's coming from someone who doesn't publish in journals. |
Great, AvantGarde was actually my first choice (!) but then I regressed. I have updated modern.conf with that choice in this branch. And not bold.
is a bit unclear and messy. |
Regarding automatic sizing, pretty much anything related to a plot should depend on size. But we need to be able to switch between auto and fixed, I think. It should be possible to get a 10 point font for annotations without guessing what the map width should be. So we need an overarching setting, maybe PLOT_SCALING = auto|manual. auto in modern and manual in classic? |
auto-scaling will be available in classic but it wont be active by default. classic.conf will retain current defaults. |
A little bit trial and error suggest a draft equation for font size in points as function of map size (in cm):
this gives 8p for a 10 cm map, 10p for a 25cm map, and 20p for a 1meter map. Would also need to apply to offsets, ticklenghs, pen thicknesses, other fontsizes for titles, labels, etc. Not sure if map size should be measured as max dimension or sqrt(area). |
It is also a bit unfortunate that we are using MAP_ for a lot of parameters that are not specific to maps, but plots in general. A Cartesian x-y plot is not a MAP, yet MAP_GRID_CROSS_SIZE_PRIMARY controls its behavior just as well. Maybe it is time to start a whole new group called PLOT_. |
@PaulWessel wrote:
Definitely! Otherwise I will get crazy … After thinking about the auto-mode a bit more I asked myself who will benefit from it. In my eyes it is only useful for
As soon as you go the publication route (paper/journal/charts) there most certainly are strict design and layout rules to follow. Maybe this could be a niche to shine so you can claim: "GMT offers themes to comply with design rules for journal XY – just use journalXY.conf in your command" |
Good points. I can see that making modern with auto the default for modern mode may be going too far since people who know what they want have to make changes all the time. I will keep this open. There are some journal guidelines, mostly on minimum font sizes, but there is probably a lot of variability. We should also allow for the fact that other people will likely create better design conf files that we can, so if we publicize this then people could contribute themes. I will retreat a bit to work on the scaling laws; this will be available to both modern and classic, and come up with some proposals. |
Just for good measure my above example with the Helvetica font which is close to the classic version:
Unfortunately not everybody has the Futura font-family available which might be another good option for the font (sleeker/similar to AvantGarde) and I like the "R" more. Why not bold for the title? Too … bold? |
Don't know if I prefer this font for annotations but what I clearly prefer is that it's not bold. The Bold title looks good and way shorter. Did not mention in the other comment. I prefer the WSen axes to the WSEN, which is too wasteful as Paul put it. |
OK, so we have some agreements. Given the relatively short list of standard PostScript fonts I think AvantGarde-Book is the best we can do. I also prefer bold in the title (and HEADING, which is master title for a bunch of subplots) but no bold on labels and the two levels of annotations. |
Both differ from origs but are good. Origs updated.
Giant gmt-themes branch merged! |
Description of proposed changes
This PR follows up on #2290 and adds the new GMT defaults parameter GMT_THEME. A theme is simply a collection of GMT default parameter settings that make sense together and have been given a suitable name. GMT comes with a few built-in themes:
The last two are of course experimental, and to implement modern (#2290) requires new coding as well. Users can add their own themes as theme.conf files in ~/.gmt.
The theme machinery has been implemented and working. For instance,
Remaking tasks: