Changeset 1603 in lmdz_wrf for trunk/tools/drawing_tools.py


Ignore:
Timestamp:
Aug 10, 2017, 5:19:00 PM (7 years ago)
Author:
lfita
Message:

Adding new default list of colors:

  • `usgscolors': colors for the LAND_USE from USGS data-set
  • `ncolorsauto': list of colors using a single letter (predefined matplotlib colors)
  • `rgbacolorsauto': the same list as 'colorauto', but using tuples of (r,g,b,a)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/drawing_tools.py

    r1589 r1603  
    3030colorsauto = ['#FF0000', '#00FF00', '#0000FF', '#FF00FF', '#00FFFF', '#FFAA00',      \
    3131  '#AA0000', '#00AA00', '#0000AA', '#AA00AA', '#00AAAA', '#AA3200', '#AA0032',       \
    32   '#32AA00', '#3200AA', '#00AA32', '#0032AA']
     32  '#32AA00', '#3200AA', '#00AA32', '#0032AA', '#32FF00', '#3200FF', '#0032FF',       \
     33  '#FF3200', '#FF0032', '#00FF32', '#323200', '#320032', '#003232']
     34
     35# USGS land types
     36usgscolors = {1: ['Urban and Built-Up Land', 'k', (0.8, 0.8, 0.8, 1.)], \
     372: ['Dryland Cropland and Pasture', 'y', (0.2, 0.9, 0., 1.)], \
     383: ['Irrigated Cropland and Pasture', 'g', (0.1, 0.9, 0., 1.)], \
     394: ['Mixed Dryland/Irrigated Cropland and Pasture', 'g', (0.15, 0.9, 0., 1.)], \
     405: ['Cropland/Grassland Mosaic', 'y', (0.1, 0.9, 0.1, 1.)], \
     416: ['Cropland/Woodland Mosaic', 'y', (0.3, 0.9, 0., 1.)], \
     427: ['Grassland', 'g', (0., 1., 0.5, 1.)], \
     438: ['Shrubland', 'y', (0.5, 0.6, 0., 1.)], \
     449: ['Mixed Shrubland/Grassland', 'y', (0.3, 0.7, 0., 1.)], \
     4510: ['Savanna', 'y', (0.6, 0.6, 0., 1.)], \
     4611: ['Deciduous Broadleaf Forest', 'g', (0., 0.4, 0., 1.)], \
     4712: ['Deciduous Needleleaf Forest', 'g', (0., 0.5, 0., 1.)], \
     4813: ['Evergreen Broadleaf Forest', 'g', (0., 0.55, 0., 1.)], \
     4914: ['Evergreen Needleleaf Forest', 'g', (0., 0.6, 0., 1.)], \
     5015: ['Mixed Forest', 'g', (0., 0.57, 0., 1.)], \
     5116: ['Water Bodies', 'b', (0.1, 0.1, 1., 1.)], \
     5217: ['Herbaceous Wetland', 'b', (0.1, 0.1, 1., 1.)], \
     5318: ['Wooded Wetland', 'g', (0., 0.8, 0., 1.)], \
     5419: ['Barren or Sparsely Vegetated', 'c', (0.8, 0.6, 0., 1.)], \
     5520: ['Herbaceous Tundra', 'c', (0.6, 0.9, 0., 1.)], \
     5621: ['Wooded Tundra', 'c', (0.7, 0.9, 0., 1.)], \
     5722: ['Mixed Tundra', 'c', (0.65, 0.9, 0., 1.)], \
     5823: ['Bare Ground Tundra', 'c', (0.9, 0.5, 0., 1.)], \
     5924: ['Snow or Ice', 'w', (0.95, 0.95, 0.95, 1.)], \
     6025: ['Playa', 'y', (0.95, 0.95, 0., 1.)], \
     6126: ['Lava', 'y', (0.95, 0.1, 0.1, 1.)], \
     6227: ['White Sand', 'y', (0.9, 0.9, 0.7, 1.)], \
     6328: ['Unassigned', 'k', (0.05, 0.05, 0.05, 1.)], \
     6429: ['Unassigned', 'k', (0.1, 0.1, 0.1, 1.)], \
     6530: ['Unassigned', 'k', (0.15, 0.15, 0.15,  1.)], \
     6631: ['Low Intensity Residential', 'k', (0.5, 0.5, 0.5, 1.)], \
     6732: ['High Intensity Residential', 'k', (0.7, 0.7, 0.7, 1.)], \
     6833: ['Industrial or Commercial', 'k', (0.9, 0.9, 0.9, 1.)]}
     69
     70ncolorsauto = ['r', 'g', 'b', 'c', 'm', 'y', 'k', 'w', \
     71  'r', 'g', 'b', 'c', 'm', 'y', 'k', 'w', \
     72  'r', 'g', 'b', 'c', 'm', 'y', 'k', 'w', \
     73  'r', 'g', 'b', 'c', 'm', 'y', 'k', 'w',]
     74
     75rgbacolorsauto = [(1.,0.,0.,1.), (0.,1.,0.,1.), (0.,0.,1.,1.), (1.,0.,1.,1.),         \
     76  (0.,1.,1.,1.), (1.,0.,1.,1.), (1., 0.5, 0., 1.), (0.5, 0., 0., 1.),                \
     77  (0., 0.5, 0., 1.), (0., 0., 0.5, 1.), (0.5, 0., 0.5, 1.),  (0., 0.5, 0.5, 1.),     \
     78  (0.5, 0.25, 0., 1.), (0.5, 0., 0.25, 1.), (0.25, 0.5, 0., 1.), (0.25, 0., 0.5, 1.),\
     79  (0., 0.5, 0.25, 1.), (0., 0.25, 0.5, 1.), (0.5, 1., 0., 1.), (0.5, 0., 1., 1.),    \
     80  (0., 0.5, 1., 1.), (1., 0.25, 0., 1.), (1., 0., 0.25, 1.), (0., 1., 0.25, 1.),     \
     81  (0.25, 0.25, 0., 1.), (0.25, 0., 0.25, 1.), (0., 0.25, 0.25, 1.)]
    3382pointkindsauto = ['.', 'x', '+', '*', '|', '_', '1', '2', '3', '4', 'o', '<', '>',   \
    3483  'v', '^', 's', 'D', 'p' ,'h' ,'H']
Note: See TracChangeset for help on using the changeset viewer.