*! version 1.1 29apr2016

Title

Scheme description: ukri graph scheme

Syntax

To use the ukri (or ukripres) scheme, you might specify it as an option in your graph command:

. graph
...,
...
scheme(ukri)

or set the scheme before running your graph command:

. set
scheme
ukri
[,
permanently]

See [G-3] scheme_option and [G-2] set scheme.

Description

Schemes determine the overall look of a graph; see
[G-4] schemes intro.

The ukri and ukripres schemes follows the UKRI
branding guidelines,
interpreting these for use in Stata graphs. Since the author works at an MRC unit, it
uses the MRC colours as primary (each council has different primary colours). It
was written as a quick way to use the UKRI corporate palette of colours,
and released on SSC in case it is of use to other UKRI employees.

In writing this scheme I made some opinionated alterations to some of the defaults
and quirks from Stata's own schemes. The scheme is fairly
minimal in style. Colours used are from UKRI's RGB colour specification. There
are faint horizontal grid lines. A vertical axis line is given but
no vertical gridlines. There are no ticks. Dots in scatterplots are hollow by
default. The height-to-width ratio of the ukri scheme is 4:5 by default.

The ukripres scheme changes the graph size and aspect to work better with
16:9 presentations. The xsize is 5 and ysize is 9, so height-to-width ratio is 5:9.

Graph schemes are skeletons, giving default specifications for general graphs;
any defaults can be changed within graph commands. For example, if ticks and
vertical grid lines are desired, these can always be included.

Colours

The ukri scheme includes various non-standard colours named (in alphabetical order)
ukriblue, ukricoral, ukridkorange, ukridkred, ukrigreen, ukrigrey, ukriltblue,
ukrimaroon, ukrimint, ukrinavy, ukriorange, ukripink, ukripurple, ukrired,
ukriteal and ukriyellow. These colours are packaged with the scheme and can
be referred to in the same way as Stata's base colours, and need not be used
with the scheme. All available colours can be viewed with
graph query color.

Fonts

There are elements to the UK Medical Research Council's branding beyond
colour. The corporate typefaces are Arial in general or Moderat
for more professional materials. See graph_set for details of how
to change the font. Note that this cannot be set within a graph scheme
and setting the font will need setting explicitly for your desired output
format. For example, to draw a graph and export it as .svg, Windows users
would first need to type

. graph
set
svg
fontface
"Arial"

to retain Arial as the font in the .eps figure. (The name of the font
may be different for different operating systems.) Similar code does the
same thing replacing eps with 'window', 'print', 'ps' or 'svg'.

The code for setting a font when exporting as .pdf is slightly different:

. translator
set
Graph2pdf
fontface
"Arial"

Author

Tim P. Morris, MRC Clinical Trials Unit at UCL, London UK

Email: tim.morris@ucl.ac.uk

Twitter: @tmorris_mrc