{ "metadata": { "name": "", "signature": "sha256:b2e2c60c1449a78a433a88e3db4a8d7a55885ffddf020edcedd568efdfd3740a" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "- [Color Brewer Diverging](#Color-Brewer-Diverging)\n", "- [Color Brewer Qualitative](#Color-Brewer-Qualitative)\n", "- [Color Brewer Sequential](#Color-Brewer-Sequential)\n", "- [Tableau](#Tableau)\n", "- [Wes Anderson](#Wes-Anderson)" ] }, { "cell_type": "code", "collapsed": false, "input": [ "from brewer2mpl import qualitative, sequential, diverging, wesanderson, tableau\n", "from brewer2mpl.colormap import ColorMap" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 1 }, { "cell_type": "code", "collapsed": false, "input": [ "def display_maps(module):\n", " for k in dir(module):\n", " thing = getattr(module, k)\n", " if isinstance(thing, dict) and 'max' in thing:\n", " thing = thing['max']\n", " if isinstance(thing, ColorMap):\n", " thing.show_as_blocks()\n", " print(k)" ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 2 }, { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Color Brewer Diverging" ] }, { "cell_type": "code", "collapsed": false, "input": [ "display_maps(diverging)" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "BrBG\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "PRGn\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "PiYG\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "PuOr\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "RdBu\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "RdGy\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "RdYlBu\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "RdYlGn\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Spectral\n" ] } ], "prompt_number": 3 }, { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Color Brewer Qualitative" ] }, { "cell_type": "code", "collapsed": false, "input": [ "display_maps(qualitative)" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Accent\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Dark2\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Paired\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Pastel1\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Pastel2\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Set1\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Set2\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Set3\n" ] } ], "prompt_number": 4 }, { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Color Brewer Sequential" ] }, { "cell_type": "code", "collapsed": false, "input": [ "display_maps(sequential)" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Blues\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "BuGn\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "BuPu\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "GnBu\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Greens\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Greys\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "OrRd\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Oranges\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "PuBu\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "PuBuGn\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "PuRd\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Purples\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "RdPu\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Reds\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "YlGn\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "YlGnBu\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "YlOrBr\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "YlOrRd\n" ] } ], "prompt_number": 5 }, { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Tableau" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Via http://www.tableausoftware.com/." ] }, { "cell_type": "code", "collapsed": false, "input": [ "for name, colormap in sorted(tableau.get_all_maps().viewitems()):\n", " colormap.show_as_blocks()\n", " print(name)\n", " " ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Blue-Red 12\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Blue-Red 6\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Color Blind 10\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Gray 5\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Green-Orange 12\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Green-Orange 6\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Purple-Gray 12\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Purple-Gray 6\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Tableau 10\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Tableau 10 Light\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Tableau 10 Medium\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Tableau 20\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Traffic Light\n" ] } ], "prompt_number": 6 }, { "cell_type": "heading", "level": 1, "metadata": {}, "source": [ "Wes Anderson" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Via http://wesandersonpalettes.tumblr.com/." ] }, { "cell_type": "code", "collapsed": false, "input": [ "display_maps(wesanderson)" ], "language": "python", "metadata": {}, "outputs": [ { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Cavalcanti\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Chevalier\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Darjeeling1\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "FantasticFox1\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "GrandBudapest1\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Margot1\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Margot2\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Mendl\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Moonrise1\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Moonrise2\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Moonrise3\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Moonrise4\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Royal1\n" ] }, { "html": [ "
" ], "metadata": {}, "output_type": "display_data", "text": [ "" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "Zissou\n" ] } ], "prompt_number": 14 }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }