项目作者: seancarmody

项目描述 :
ColorBrewer palettes for Asymptote
高级语言: Asymptote
项目地址: git://github.com/seancarmody/asy-brewer.git
创建时间: 2021-01-04T05:36:00Z
项目社区:https://github.com/seancarmody/asy-brewer

开源协议:Apache License 2.0

下载


asy-brewer: ColorBrewer palettes for Asymptote

Asymptote is vector graphics language for
technical drawing. It ships with a number of base modules including palettes
which provides a number of colour palettes. This module supplements these with
Cynthia Brewer and Mark Hadden’s ColorBrewer palettes (http://colorbrewer2.org/).

The ColorBrewer palettes were designed for maps, allowing effective differentiation
of different colours in neighbouring regions, but they are also useful for other
applications.

HarrowerBrewer2003:
Harrower, Mark, and Cynthia A. Brewer. “ColorBrewer. org: an online tool for
selecting colour schemes for maps.” The Cartographic Journal 40.1 (2003): 27-37.

This module provides three functions returning different types of palettes:

  • Sequential: suited to data that ranges from low to high values either on an
    ordinal scale (e.g. cold, warm, hot) or on a numerical scale
  • Diverging: used when a critical data class or break point needs to be emphasised
  • Qualitative: used for data that does not imply order, but difference in kind

Example Usage:

  1. access brewer;
  2. size(100);
  3. pen[] cols = brewer.Qualitative("Paired", 6);
  4. fill(unitcircle, cols[0]);

Included in this repository is the file demo.asy which gives a further example of
usage of the module which produces the figure below.

Colour Demo

Also included in this repository is brewer.json which provides all of the ColorBrewer
palettes in JSON format.