Skip to content
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

Update modern theme and add minimal theme #4596

Merged
merged 6 commits into from
Dec 22, 2020

Conversation

maxrjones
Copy link
Member

Description of proposed changes

Implement changes for modern theme recommended in #3344 and the community meeting:

  1. Change modern theme frame from plain to fancy
  2. Change modern theme font from AvantGarde to Helvetica
  3. Add 'minimal' theme with AvantGarde font and plain frame

This PR also removes the return from gmtinit_conf_modern_override for testing, which can be re-added if necessary

Reminders

  • Make sure that your code follows our style. Use the other functions/files as a basis.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Describe changes to function behavior and arguments in a comment below the function declaration.
  • If adding new functionality, add a detailed description to the documentation and/or an example.

Copy link
Member

@PaulWessel PaulWessel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but did not have time to test it...

@maxrjones maxrjones merged commit 21645b9 into GenericMappingTools:gmt-themes Dec 22, 2020
PaulWessel added a commit that referenced this pull request Mar 12, 2021
* Add new GMT_THEME default setting

This will take the name of a separate .conf file that will override the current settings.

* Update names

* Create darkmode.conf

* Wrap up theme machinery

* Update gmt.conf.rst

* Update darkmode.conf

* Play with modern.conf

* Trial modern.conf

* Address comments

* use AvantGarde font

* Bold titles

* Update modern.conf

* Update modern.conf

* Implement auto scaling

* Update modern.conf

* Update gmt_plot.c

* Update gmt_map.c

* smaller offsets

* Let modern have modern defaults

* Update modern.conf

* Updates

* Leave gridlines black and lines with butt cap

* Update inverse and darkmode to be modern

* Move the auto-font-size function to gmt_init.c

* Allow --PAR-value overrides for auto scaling

* Update gmt_init.c

* Improve scripts in general

* Update scripts and fix internals

* Eliminate unneeded gmt set calls

* Update gmt_init.c

* Update gmt_init.c

* Use auto <--> NaN in gmt.conf parsing

* Update gmt_init.c

* Use NaN for undefined font size as well

* Eliminate unneeded MAP_AUTO_SCALE

* Update docs

* Update subplot.c

* Update psscale.c

* update undefined defaults at end of GMT_Parse_Common

That is when we are done parsing any --PAR=value options

* Fix subplot with WrStZ defaults under modern

HEre, if we have W and a panel should not be annotated and w is not selected, then it should be l if either W or l is in the defaults.  Some with b of S or b is in the default.

* Let MAP_ANNOT_MIN_SPACING join the auto-scaled items

Nominally 36p, it now is auto and will scale with the primary fontsize.

* Do not let gmtset expand auto to anything

* Fix vector shape init

* protect sides in psscale.

The resetting interfered with auto-annotation of colorbars.

* Update gmt_init.c

* Fix pstext to initialize default font

* Forgot to update the theme in gmtinit_conf_modern_override (#3508)

This function is called when modern theme is selected in classic or always in modern.  But it failed to actually set the GMT_THEME variable so in classic mode it reverted to classic before writing out the theme.

* Lengthen ticks and slightly increase font size

* Fix multiple addition of frame width

* Update gmt_init.c

* Update gmt_init.c

* Update inverse.conf

* Update gmt_init.c

* Fix auto setting for MAP_FRAME_WIDTH

* Update modern theme and add minimal theme (#4596)

* Change modern default MAP_FRAME_TYPE to fancy

* Make Helvetica default font for modern theme

* Remove return from gmtinit_conf_modern_override

* Fix typo

* Add minimal theme

* Make modern font heading and title bold

* Remove unfinished themes darkmode, inverse, movie

* Update doc/rst/source/gmt.conf.rst

Co-authored-by: Meghan Jones <[email protected]>

* Update src/gmt_init.c

Co-authored-by: Meghan Jones <[email protected]>

* Update doc/rst/source/cookbook/features.rst

Co-authored-by: Dongdong Tian <[email protected]>

* Update doc/examples/ex41/ex41.sh

Co-authored-by: Dongdong Tian <[email protected]>

* Remove MAP_ANNOT_MIN_SPACING auto-scaling (#4704)

* Update doc/scripts/GMT_TM.sh

* Add auto-scaling for new subtitle font as well

* Testing a GMT_THEME off solution (#4710)

* Testing a GMT_THEME off solution

Goal is to allow suers to override specifics in the theme settings without having the THEME be parsed again and overwrite the changes

* Update gmt_init.c

* Themes autoaxes (#4715)

* Aadd auto mode for GMT_MAP_AXES

The default choice may need to depend on view-angle, if azimuthal or cylindrical, etc.

* Handle polar and rotated schemes

* Update gmt_init.c

* Subplot axes (#4720)

* Better interplay between -S and MAP_FRAME_AXES

WHen -S is used for rows or cols then we should let it do its thing, not parse MAP_FRAME_AXES.  If not set then we do.

* Deal with subplot-specific gmt.conf settings

Must create a gmt.conf for a subplot if modern theme so that all fonts etc will be the same across all panels.

* Progress on auto axes and subplots

* COmments

* Fix delayed get_scale calls

* Update pslegend.c

* Update pslegend.c

* Update psscale.c

* Update pslegend.c

* Update GMT_legend.sh

* Use geometric mean of plot dimensions for reference, and delete temp files

* Allow testing of classic only via -DNO_THEMES

* Update gmt_map.c

* Update documentation for gmt themes (#4717)

* List all parameters alphabetically

* Start descriptions for themes and auto settings

* Complete auto scaling documentation

* Add FONT_SUBTITLE to tables

* Fix classic default

* Update auto scaling description

* Fix font settings

* Update FONT_SUBTITLE default

* Update MAP_TICK_PEN_PRIMARY default docs

* Update theme dependent defaults

* Fix a typo

* Format defaults documentation

* Move theme-settings to separate docs page

* Update auto scaling links

* Update auto scaling documentation

* Link themes table to gmt.conf keywords

* Add more links between auto, gmt.conf, and themes

* Fix formatting

* Update MAP_ANNOT_MIN_SPACING default

* Format doc/rst/source/cookbook/features.rst

* Update auto-scaling docs for unknown dimensions

* Update doc/scripts/GMT_dir_rose.sh

* Remove trailing whitespace

* Handle gmt set GMT_THEME classic in a modern session (#4726)

* Handle gmt set GMT_THEME classic in a modern session

Since modern defaults have been set, this PR will flag all the defaults that differ between classic and modern themes so they are updated.

* Update src/gmt_init.c

Co-authored-by: Meghan Jones <[email protected]>

* Update GMT_legend.sh test

* Add NO_THEMES definition to template

* Update GMT_Defaults_1b.sh test

* Update position for anim02.sh

* Update TMcontours.sh test

* Init frame_width before using it to init tick length

Fixes the problem with sphareacentroid.sh and possibly others

* Add auto scaling for MAP_ANNOT_MIN_SPACING

* Auto for MAP_POLAR_CAP (#4854)

* Let POLAR_CAP be auto under modern mode

* Update and add docs

* Update themes.conf files

* Add comments

* Update docs for MAP_POLAR_CAP=auto

Co-authored-by: Meghan Jones <[email protected]>

* Setup map before histogram autolegend

* Explore separate MAP_ANNOT_OBLIQUE settings for oblique and other projections (#4890)

* Explore separate MAP_ANNOT_OBLIQUE settings for oblique and other projections

This PR to be merged into gmt-themes sets MAP_ANNOT_OBLIQUE to be lon_horizontal,lat_horizontao,tick_extend but will reset this to the previous default anywhere unless the user manually changed the setting.

* UPdate

* Reset map_annot_oblique_set when we reset settings

* Update gmt_init.c

* Update gmt_init.c

* Update subplot tests

* Change warnings to debug messages

* Improve spacing for anim05.sh

* Use consistent font size for ex49.sh

* Update share/themes based on gmt_init.c

* Update gmt.conf.rst

* Update gmt-themes docs

* Update PS files for -B scripts

* Add cookbook theme

* Set GMT_THEME=cookbook for doc/scripts

* Update PostScript tests

* Update failing test

* Update failing test

* Update postscript files

* Update failing tests

* Update GMT_cycle_1.sh

* Update symbol_orientation PS files

Both differ from origs but are good. Origs updated.

* Update ps for ex23 and ex49

Co-authored-by: Meghan Jones <[email protected]>
Co-authored-by: Meghan Jones <[email protected]>
Co-authored-by: Dongdong Tian <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants