19 '''Visualize dot graphs via the xdot format.''' 21 __author__ =
"Jose Fonseca" 51 """Store pen attributes.""" 55 self.
color = (0.0, 0.0, 0.0, 1.0)
63 """Create a copy of this pen.""" 65 pen.__dict__ = self.__dict__.copy()
70 pen.color = (1, 0, 0, 1)
71 pen.fillcolor = (1, .8, .8, 1)
76 """Abstract base class for all the drawing shapes.""" 81 def draw(self, cr, highlight=False):
82 """Draw this shape with the given cairo context""" 83 raise NotImplementedError
87 if not hasattr(self,
'highlight_pen'):
100 LEFT, CENTER, RIGHT = -1, 0, 1
111 def draw(self, cr, highlight=False):
115 except AttributeError:
116 layout = cr.create_layout()
120 context = layout.get_context()
121 fo = cairo.FontOptions()
122 fo.set_antialias(cairo.ANTIALIAS_DEFAULT)
123 fo.set_hint_style(cairo.HINT_STYLE_NONE)
124 fo.set_hint_metrics(cairo.HINT_METRICS_OFF)
126 pangocairo.context_set_font_options(context, fo)
133 font = pango.FontDescription()
134 font.set_family(self.pen.fontname)
135 font.set_absolute_size(self.pen.fontsize*pango.SCALE)
136 layout.set_font_description(font)
139 layout.set_text(self.
t)
144 cr.update_layout(layout)
148 width, height = layout.get_size()
149 width = float(width)/pango.SCALE
150 height = float(height)/pango.SCALE
162 if self.
j == self.
LEFT:
165 x = self.
x - 0.5*width
166 elif self.
j == self.
RIGHT:
171 y = self.
y - height + descent
177 cr.set_source_rgba(*self.
select_pen(highlight).color)
178 cr.show_layout(layout)
183 cr.set_source_rgba(1, 0, 0, .9)
184 if self.
j == self.
LEFT:
187 x = self.
x - 0.5*self.
w 188 elif self.
j == self.
RIGHT:
190 cr.move_to(x, self.
y)
191 cr.line_to(x+self.
w, self.
y)
197 def __init__(self, pen, x0, y0, w, h, filled=False):
206 def draw(self, cr, highlight=False):
208 cr.translate(self.
x0, self.
y0)
209 cr.scale(self.
w, self.
h)
211 cr.arc(0.0, 0.0, 1.0, 0, 2.0*math.pi)
215 cr.set_source_rgba(*pen.fillcolor)
218 cr.set_dash(pen.dash)
219 cr.set_line_width(pen.linewidth)
220 cr.set_source_rgba(*pen.color)
232 def draw(self, cr, highlight=False):
240 cr.set_source_rgba(*pen.fillcolor)
244 cr.set_dash(pen.dash)
245 cr.set_line_width(pen.linewidth)
246 cr.set_source_rgba(*pen.color)
257 def draw(self, cr, highlight=False):
260 for x1, y1
in self.
points[1:]:
263 cr.set_dash(pen.dash)
264 cr.set_line_width(pen.linewidth)
265 cr.set_source_rgba(*pen.color)
277 def draw(self, cr, highlight=False):
280 for i
in xrange(1, len(self.
points), 3):
282 x2, y2 = self.
points[i + 1]
283 x3, y3 = self.
points[i + 2]
284 cr.curve_to(x1, y1, x2, y2, x3, y3)
287 cr.set_source_rgba(*pen.fillcolor)
291 cr.set_dash(pen.dash)
292 cr.set_line_width(pen.linewidth)
293 cr.set_source_rgba(*pen.color)
303 def draw(self, cr, highlight=False):
305 shape.draw(cr, highlight=highlight)
313 if highlight
is None:
314 highlight = set([item])
320 def __init__(self, item, x, y, highlight=None, url=None):
324 if highlight
is None:
325 highlight = set([item])
331 """Base class for graph nodes and edges.""" 334 CompoundShape.__init__(self, shapes)
346 Element.__init__(self, shapes)
359 return self.
x1 <= x
and x <= self.
x2 and self.
y1 <= y
and y <= self.
y2 366 return Url(self, self.
url)
371 return Jump(self, self.
x, self.
y)
378 return deltax*deltax + deltay*deltay
384 Element.__init__(self, shapes)
394 return Jump(self, self.dst.x, self.dst.y, highlight=set([self, self.
dst]),url=self.
url)
396 return Jump(self, self.src.x, self.src.y, highlight=set([self, self.
src]),url=self.
url)
402 def __init__(self, width=1, height=1, shapes=(), nodes=(), edges=(), subgraph_shapes={}):
415 def draw(self, cr, highlight_items=None):
416 if highlight_items
is None:
418 cr.set_source_rgba(0.0, 0.0, 0.0, 1.0)
420 cr.set_line_cap(cairo.LINE_CAP_BUTT)
421 cr.set_line_join(cairo.LINE_JOIN_MITER)
425 for edge
in self.
edges:
426 edge.draw(cr, highlight=(edge
in highlight_items))
427 for node
in self.
nodes:
428 node.draw(cr, highlight=(node
in highlight_items))
431 for node
in self.
nodes:
432 url = node.get_url(x, y)
438 for edge
in self.
edges:
439 jump = edge.get_jump(x, y)
442 for node
in self.
nodes:
443 jump = node.get_jump(x, y)
450 """Parser for xdot drawing attributes. 452 - http://www.graphviz.org/doc/info/output.html#d:xdot 464 return self.
pos < len(self.
buf)
467 buf = buf.replace(
'\\"',
'"')
468 buf = buf.replace(
'\\n',
'\n')
472 pos = self.buf.find(
" ", self.
pos)
473 res = self.
buf[self.
pos:pos]
475 while self.
pos < len(self.
buf)
and self.
buf[self.
pos].isspace():
492 pos = self.buf.find(
"-", self.
pos) + 1
494 res = self.
buf[pos:self.
pos]
495 while self.
pos < len(self.
buf)
and self.
buf[self.
pos].isspace():
512 hex2float =
lambda h: float(int(h, 16)/255.0)
513 r = hex2float(c[1:3])
514 g = hex2float(c[3:5])
515 b = hex2float(c[5:7])
517 a = hex2float(c[7:9])
518 except (IndexError, ValueError):
521 elif c1.isdigit()
or c1 ==
".":
523 h, s, v = map(float, c.replace(
",",
" ").split())
524 r, g, b = colorsys.hsv_to_rgb(h, s, v)
532 color = gtk.gdk.color_parse(c)
544 dummy, scheme, index = c.split(
'/')
545 r, g, b = brewer_colors[scheme][int(index)]
546 except (ValueError, KeyError):
556 sys.stderr.write(
"unknown color '%s'\n" % c)
565 color = s.read_color()
566 if color
is not None:
569 color = s.read_color()
570 if color
is not None:
574 style = s.read_text()
575 if style.startswith(
"setlinewidth("):
576 lw = style.split(
"(")[1].split(
")")[0]
579 elif style
in (
"solid",
"dashed"):
582 size = s.read_float()
586 x, y = s.read_point()
592 x0, y0 = s.read_point()
597 x0, y0 = s.read_point()
617 sys.stderr.write(
"unknown xdot opcode '%s'\n" % op)
623 return self.parser.transform(x, y)
627 self.pen.fillcolor = color
629 self.pen.color = color
632 self.pen.linewidth = linewidth
637 elif style ==
"dashed":
638 self.pen.dash = (6, )
641 self.pen.fontsize = size
642 self.pen.fontname = name
675 def __init__(self, msg=None, filename=None, line=None, col=None):
682 return ':'.join([str(part)
for part
in (self.
filename, self.
line, self.
col, self.
msg)
if part !=
None])
686 """Stateless scanner.""" 697 flags |= re.IGNORECASE
699 '|'.join([
'(' + regexp +
')' for type, regexp, test_lit
in self.
tokens]),
706 mo = self.tokens_re.match(buf, pos)
709 type, regexp, test_lit = self.
tokens[mo.lastindex - 1]
712 type = self.literals.get(text, type)
713 return type, text, pos
716 return self.symbols.get(c,
None), c, pos + 1
734 newline_re = re.compile(
r'\r\n?|\n')
736 def __init__(self, buf = None, pos = 0, filename = None, fp = None):
740 length = os.path.getsize(fp.name)
750 buf = mmap.mmap(fileno, length, access = mmap.ACCESS_READ)
751 pos = os.lseek(fileno, 0, 1)
759 except AttributeError:
775 type, text, endpos = self.scanner.next(self.
buf, pos)
776 assert pos + len(text) == endpos
778 type, text = self.filter(type, text)
784 msg =
'unexpected char ' 785 if text >=
' ' and text <=
'~':
788 msg +=
"0x%X" % ord(text)
792 return Token(type = type, text = text, line = line, col = col)
797 for mo
in self.newline_re.finditer(text, pos):
804 tabpos = text.find(
'\t', pos)
807 self.
col += tabpos - pos
810 self.
col += len(text) - pos
820 if self.lookahead.type != type:
822 msg =
'unexpected token %r' % self.lookahead.text,
823 filename = self.lexer.filename,
824 line = self.lookahead.line,
825 col = self.lookahead.col)
828 while self.lookahead.type != type:
873 (ID,
r'[a-zA-Z_\x80-\xff][a-zA-Z0-9_\x80-\xff]*',
True),
876 (ID,
r'-?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)',
False),
879 (STR_ID,
r'"[^"\\]*(?:\\.[^"\\]*)*"',
False),
882 (HTML_ID,
r'<[^<>]*(?:<[^<>]*>[^<>]*)*>',
False),
885 (EDGE_OP,
r'-[>-]',
False),
908 'subgraph': SUBGRAPH,
924 text = text.replace(
'\\\r\n',
'')
925 text = text.replace(
'\\\r',
'')
926 text = text.replace(
'\\\n',
'')
928 text = text.replace(
'\\r', '\r')
929 text = text.replace(
'\\n',
'\n')
930 text = text.replace(
'\\t',
'\t')
931 text = text.replace(
'\\',
'')
935 elif type == HTML_ID:
945 Parser.__init__(self, lexer)
955 if self.lookahead.type == STRICT:
959 while self.lookahead.type != RCURLY:
965 shapes_before = set(self.shapes)
966 if self.lookahead.type == SUBGRAPH:
968 if self.lookahead.type == ID:
969 id = self.lookahead.text
971 if self.lookahead.type == LCURLY:
973 while self.lookahead.type != RCURLY:
976 new_shapes = set(self.shapes) - shapes_before
977 self.subgraph_shapes[id] = [s
for s
in new_shapes
if not any([s
in ss
for ss
in self.subgraph_shapes.values()])]
981 if self.lookahead.type == GRAPH:
984 self.graph_attrs.update(attrs)
986 elif self.lookahead.type == NODE:
989 elif self.lookahead.type == EDGE:
992 elif self.lookahead.type
in (SUBGRAPH, LCURLY):
996 if self.lookahead.type == EDGE_OP:
999 while self.lookahead.type == EDGE_OP:
1002 for i
in range(0, len(node_ids) - 1):
1003 self.
handle_edge(node_ids[i], node_ids[i + 1], attrs)
1004 elif self.lookahead.type == EQUAL:
1010 if self.lookahead.type == SEMI:
1015 while self.lookahead.type == LSQUARE:
1017 while self.lookahead.type != RSQUARE:
1020 if self.lookahead.type == COMMA:
1027 if self.lookahead.type == EQUAL:
1036 if self.lookahead.type == COLON:
1039 if self.lookahead.type == COLON:
1052 id = self.lookahead.text
1066 class XDotParser(DotParser):
1070 DotParser.__init__(self, lexer)
1089 xmin, ymin, xmax, ymax = map(float, bb.split(
","))
1102 for attr
in (
"_draw_",
"_ldraw_",
"_hdraw_",
"_tdraw_",
"_hldraw_",
"_tldraw_"):
1105 self.shapes.extend(parser.parse())
1114 w = float(attrs[
'width'])*72
1115 h = float(attrs[
'height'])*72
1117 for attr
in (
"_draw_",
"_ldraw_"):
1120 shapes.extend(parser.parse())
1121 url = attrs.get(
'URL',
None)
1122 node =
Node(x, y, w, h, shapes, url)
1125 self.nodes.append(node)
1135 for attr
in (
"_draw_",
"_ldraw_",
"_hdraw_",
"_tdraw_",
"_hldraw_",
"_tldraw_"):
1138 shapes.extend(parser.parse())
1139 url = attrs.get(
'URL',
None)
1143 self.edges.append(
Edge(src, dst, points, shapes, url))
1146 DotParser.parse(self)
1149 for k,shapes in self.subgraph_shapes.iteritems(): 1150 self.shapes += shapes 1156 x, y = pos.split(
",")
1157 return self.
transform(float(x), float(y))
1161 for entry
in pos.split(
' '):
1162 fields = entry.split(
',')
1169 points.append(self.
transform(float(x), float(y)))
1209 class LinearAnimation(Animation):
1215 Animation.start(self)
1219 self.
animate(max(0, min(t, 1)))
1226 class MoveToAnimation(LinearAnimation):
1229 Animation.__init__(self, dot_widget)
1238 self.dot_widget.x = tx * t + sx * (1-t)
1239 self.dot_widget.y = ty * t + sy * (1-t)
1240 self.dot_widget.queue_draw()
1246 MoveToAnimation.__init__(self, dot_widget, target_x, target_y)
1255 rect = self.dot_widget.get_allocation()
1256 visible = min(rect.width, rect.height) / self.dot_widget.zoom_ratio
1259 desired_middle_zoom = visible / distance
1260 self.
extra_zoom = min(0, 4 * (desired_middle_zoom - middle_zoom))
1264 self.dot_widget.zoom_ratio = c*t + b*t*(1-t) + a*(1-t)
1265 self.dot_widget.zoom_to_fit_on_resize =
False 1266 MoveToAnimation.animate(self, t)
1281 x, y, state = event.window.get_pointer()
1283 x, y, state = event.x, event.y, event.state
1286 self.
drag(deltax, deltay)
1311 class NullAction(DragAction):
1315 x, y, state = event.window.get_pointer()
1317 x, y, state = event.x, event.y, event.state
1319 item = dot_widget.get_url(x, y)
1321 item = dot_widget.get_jump(x, y)
1322 if item
is not None:
1323 dot_widget.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.HAND2))
1324 dot_widget.set_highlight(item.highlight)
1326 dot_widget.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.ARROW))
1327 dot_widget.set_highlight(
None)
1333 self.dot_widget.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.FLEUR))
1336 self.dot_widget.x += deltax / self.dot_widget.zoom_ratio
1337 self.dot_widget.y += deltay / self.dot_widget.zoom_ratio
1338 self.dot_widget.queue_draw()
1341 self.dot_widget.window.set_cursor(gtk.gdk.Cursor(gtk.gdk.ARROW))
1349 self.dot_widget.zoom_ratio *= 1.005 ** (deltax + deltay)
1350 self.dot_widget.zoom_to_fit_on_resize =
False 1351 self.dot_widget.queue_draw()
1354 self.dot_widget.queue_draw()
1360 self.dot_widget.queue_draw()
1364 cr.set_source_rgba(.5, .5, 1.0, 0.25)
1369 cr.set_source_rgba(.5, .5, 1.0, 1.0)
1370 cr.set_line_width(1)
1378 x1, y1 = self.dot_widget.window2graph(self.
startmousex,
1380 x2, y2 = self.dot_widget.window2graph(self.
stopmousex,
1382 self.dot_widget.zoom_to_area(x1, y1, x2, y2)
1385 self.dot_widget.queue_draw()
1389 """PyGTK widget that draws dot graphs.""" 1392 'expose-event':
'override',
1393 'clicked' : (gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, (gobject.TYPE_STRING, gtk.gdk.Event))
1399 gtk.DrawingArea.__init__(self)
1404 self.set_flags(gtk.CAN_FOCUS)
1406 self.add_events(gtk.gdk.BUTTON_PRESS_MASK | gtk.gdk.BUTTON_RELEASE_MASK)
1409 self.add_events(gtk.gdk.POINTER_MOTION_MASK | gtk.gdk.POINTER_MOTION_HINT_MASK | gtk.gdk.BUTTON_RELEASE_MASK)
1416 self.
x, self.
y = 0.0, 0.0
1428 if isinstance(dotcode, unicode):
1429 dotcode = dotcode.encode(
'utf8')
1430 p = subprocess.Popen(
1432 stdin=subprocess.PIPE,
1433 stdout=subprocess.PIPE,
1434 stderr=subprocess.PIPE,
1436 universal_newlines=
True 1438 xdotcode, error = p.communicate(dotcode)
1439 if p.returncode != 0:
1440 print "UNABLE TO SHELL TO DOT", error
1441 dialog = gtk.MessageDialog(type=gtk.MESSAGE_ERROR,
1442 message_format=error,
1443 buttons=gtk.BUTTONS_OK)
1444 dialog.set_title(
'Dot Viewer')
1450 except ParseError, ex:
1451 dialog = gtk.MessageDialog(type=gtk.MESSAGE_ERROR,
1452 message_format=str(ex),
1453 buttons=gtk.BUTTONS_OK)
1454 dialog.set_title(
'Dot Viewer')
1465 self.
graph = parser.parse()
1478 cr = self.window.cairo_create()
1482 event.area.x, event.area.y,
1483 event.area.width, event.area.height
1487 cr.set_source_rgba(1.0, 1.0, 1.0, 1.0)
1491 rect = self.get_allocation()
1492 cr.translate(0.5*rect.width, 0.5*rect.height)
1494 cr.translate(-self.
x, -self.
y)
1496 self.graph.draw(cr, highlight_items=self.
highlight)
1499 self.drag_action.draw(cr)
1504 return self.
x, self.
y 1518 self.
x = self.graph.width/2
1519 self.
y = self.graph.height/2
1520 elif pos
is not None:
1521 rect = self.get_allocation()
1524 y -= 0.5*rect.height
1532 rect = self.get_allocation()
1533 width = abs(x1 - x2)
1534 height = abs(y1 - y2)
1536 float(rect.width)/float(width),
1537 float(rect.height)/float(height)
1540 self.
x = (x1 + x2) / 2
1541 self.
y = (y1 + y2) / 2
1545 rect = self.get_allocation()
1551 float(rect.width)/float(self.graph.width),
1552 float(rect.height)/float(self.graph.height)
1557 ZOOM_INCREMENT = 1.25
1558 ZOOM_TO_FIT_MARGIN = 12
1575 if event.keyval == gtk.keysyms.Left:
1579 if event.keyval == gtk.keysyms.Right:
1583 if event.keyval == gtk.keysyms.Up:
1587 if event.keyval == gtk.keysyms.Down:
1591 if event.keyval == gtk.keysyms.Page_Up:
1595 if event.keyval == gtk.keysyms.Page_Down:
1599 if event.keyval == gtk.keysyms.Escape:
1600 self.drag_action.abort()
1603 if event.keyval == gtk.keysyms.r:
1606 if event.keyval == gtk.keysyms.q:
1613 if event.button
in (1, 2):
1614 if state & gtk.gdk.CONTROL_MASK:
1616 elif state & gtk.gdk.SHIFT_MASK:
1617 return ZoomAreaAction
1623 self.animation.stop()
1624 self.drag_action.abort()
1627 self.drag_action.on_button_press(event)
1633 def is_click(self, event, click_fuzz=4, click_timeout=1.0):
1634 assert event.type == gtk.gdk.BUTTON_RELEASE
1640 deltax = self.
pressx - event.x
1641 deltay = self.
pressy - event.y
1642 return (time.time() < self.
presstime + click_timeout
1643 and math.hypot(deltax, deltay) < click_fuzz)
1646 self.drag_action.on_button_release(event)
1648 if event.button == 1
and self.
is_click(event):
1649 x, y = int(event.x), int(event.y)
1652 self.emit(
'clicked', unicode(url.url), event)
1655 if jump
is not None:
1659 if event.button == 1
or event.button == 2:
1664 if event.direction == gtk.gdk.SCROLL_UP:
1666 pos=(event.x, event.y))
1668 if event.direction == gtk.gdk.SCROLL_DOWN:
1670 pos=(event.x, event.y))
1675 self.drag_action.on_motion_notify(event)
1684 self.animation.start()
1687 rect = self.get_allocation()
1689 y -= 0.5*rect.height
1698 return self.graph.get_url(x, y)
1702 return self.graph.get_jump(x, y)
1709 <toolbar name="ToolBar"> 1710 <toolitem action="Open"/> 1711 <toolitem action="Reload"/> 1713 <toolitem action="ZoomIn"/> 1714 <toolitem action="ZoomOut"/> 1715 <toolitem action="ZoomFit"/> 1716 <toolitem action="Zoom100"/> 1722 gtk.Window.__init__(self)
1728 window.set_title(
'Dot Viewer')
1729 window.set_default_size(512, 512)
1739 accelgroup = uimanager.get_accel_group()
1740 window.add_accel_group(accelgroup)
1743 actiongroup = gtk.ActionGroup(
'Actions')
1747 actiongroup.add_actions((
1748 (
'Open', gtk.STOCK_OPEN,
None,
None,
None, self.
on_open),
1749 (
'Reload', gtk.STOCK_REFRESH,
None,
None,
None, self.
on_reload),
1750 (
'ZoomIn', gtk.STOCK_ZOOM_IN,
None,
None,
None, self.widget.on_zoom_in),
1751 (
'ZoomOut', gtk.STOCK_ZOOM_OUT,
None,
None,
None, self.widget.on_zoom_out),
1752 (
'ZoomFit', gtk.STOCK_ZOOM_FIT,
None,
None,
None, self.widget.on_zoom_fit),
1753 (
'Zoom100', gtk.STOCK_ZOOM_100,
None,
None,
None, self.widget.on_zoom_100),
1757 uimanager.insert_action_group(actiongroup, 0)
1760 uimanager.add_ui_from_string(self.
ui)
1763 toolbar = uimanager.get_widget(
'/ToolBar')
1764 vbox.pack_start(toolbar,
False)
1766 vbox.pack_start(self.
widget)
1768 self.set_focus(self.
widget)
1774 if not hasattr(self,
"last_mtime"):
1777 current_mtime = os.stat(filename).st_mtime
1785 self.widget.set_filter(filter)
1788 if self.widget.set_dotcode(dotcode, filename):
1789 self.set_title(os.path.basename(filename) +
' - Dot Viewer')
1791 self.widget.zoom_to_fit()
1794 if self.widget.set_xdotcode(xdotcode):
1795 self.set_title(os.path.basename(filename) +
' - Dot Viewer')
1796 self.widget.zoom_to_fit()
1800 fp = file(filename,
'rt')
1804 dlg = gtk.MessageDialog(type=gtk.MESSAGE_ERROR,
1805 message_format=str(ex),
1806 buttons=gtk.BUTTONS_OK)
1807 dlg.set_title(
'Dot Viewer')
1812 chooser = gtk.FileChooserDialog(title=
"Open dot File",
1813 action=gtk.FILE_CHOOSER_ACTION_OPEN,
1814 buttons=(gtk.STOCK_CANCEL,
1815 gtk.RESPONSE_CANCEL,
1818 chooser.set_default_response(gtk.RESPONSE_OK)
1819 filter = gtk.FileFilter()
1820 filter.set_name(
"Graphviz dot files")
1821 filter.add_pattern(
"*.dot")
1822 chooser.add_filter(filter)
1823 filter = gtk.FileFilter()
1824 filter.set_name(
"All files")
1825 filter.add_pattern(
"*")
1826 chooser.add_filter(filter)
1827 if chooser.run() == gtk.RESPONSE_OK:
1828 filename = chooser.get_filename()
1835 self.widget.reload()
1841 parser = optparse.OptionParser(
1842 usage=
'\n\t%prog [file]',
1843 version=
'%%prog %s' % __version__)
1846 type=
'choice', choices=(
'dot',
'neato',
'twopi',
'circo',
'fdp'),
1847 dest=
'filter', default=
'dot',
1848 help=
'graphviz filter: dot, neato, twopi, circo, or fdp [default: %default]')
1850 (options, args) = parser.parse_args(sys.argv[1:])
1852 parser.error(
'incorrect number of arguments')
1855 win.connect(
'destroy', gtk.main_quit)
1856 win.set_filter(options.filter)
1859 win.set_dotcode(sys.stdin.read())
1861 win.open_file(args[0])
1862 gobject.timeout_add(1000, win.update, args[0])
1906 'accent3': [(127, 201, 127), (190, 174, 212), (253, 192, 134)],
1907 'accent4': [(127, 201, 127), (190, 174, 212), (253, 192, 134), (255, 255, 153)],
1908 'accent5': [(127, 201, 127), (190, 174, 212), (253, 192, 134), (255, 255, 153), (56, 108, 176)],
1909 'accent6': [(127, 201, 127), (190, 174, 212), (253, 192, 134), (255, 255, 153), (56, 108, 176), (240, 2, 127)],
1910 'accent7': [(127, 201, 127), (190, 174, 212), (253, 192, 134), (255, 255, 153), (56, 108, 176), (240, 2, 127), (191, 91, 23)],
1911 'accent8': [(127, 201, 127), (190, 174, 212), (253, 192, 134), (255, 255, 153), (56, 108, 176), (240, 2, 127), (191, 91, 23), (102, 102, 102)],
1912 'blues3': [(222, 235, 247), (158, 202, 225), (49, 130, 189)],
1913 'blues4': [(239, 243, 255), (189, 215, 231), (107, 174, 214), (33, 113, 181)],
1914 'blues5': [(239, 243, 255), (189, 215, 231), (107, 174, 214), (49, 130, 189), (8, 81, 156)],
1915 'blues6': [(239, 243, 255), (198, 219, 239), (158, 202, 225), (107, 174, 214), (49, 130, 189), (8, 81, 156)],
1916 'blues7': [(239, 243, 255), (198, 219, 239), (158, 202, 225), (107, 174, 214), (66, 146, 198), (33, 113, 181), (8, 69, 148)],
1917 'blues8': [(247, 251, 255), (222, 235, 247), (198, 219, 239), (158, 202, 225), (107, 174, 214), (66, 146, 198), (33, 113, 181), (8, 69, 148)],
1918 'blues9': [(247, 251, 255), (222, 235, 247), (198, 219, 239), (158, 202, 225), (107, 174, 214), (66, 146, 198), (33, 113, 181), (8, 81, 156), (8, 48, 107)],
1919 'brbg10': [(84, 48, 5), (0, 60, 48), (140, 81, 10), (191, 129, 45), (223, 194, 125), (246, 232, 195), (199, 234, 229), (128, 205, 193), (53, 151, 143), (1, 102, 94)],
1920 'brbg11': [(84, 48, 5), (1, 102, 94), (0, 60, 48), (140, 81, 10), (191, 129, 45), (223, 194, 125), (246, 232, 195), (245, 245, 245), (199, 234, 229), (128, 205, 193), (53, 151, 143)],
1921 'brbg3': [(216, 179, 101), (245, 245, 245), (90, 180, 172)],
1922 'brbg4': [(166, 97, 26), (223, 194, 125), (128, 205, 193), (1, 133, 113)],
1923 'brbg5': [(166, 97, 26), (223, 194, 125), (245, 245, 245), (128, 205, 193), (1, 133, 113)],
1924 'brbg6': [(140, 81, 10), (216, 179, 101), (246, 232, 195), (199, 234, 229), (90, 180, 172), (1, 102, 94)],
1925 'brbg7': [(140, 81, 10), (216, 179, 101), (246, 232, 195), (245, 245, 245), (199, 234, 229), (90, 180, 172), (1, 102, 94)],
1926 'brbg8': [(140, 81, 10), (191, 129, 45), (223, 194, 125), (246, 232, 195), (199, 234, 229), (128, 205, 193), (53, 151, 143), (1, 102, 94)],
1927 'brbg9': [(140, 81, 10), (191, 129, 45), (223, 194, 125), (246, 232, 195), (245, 245, 245), (199, 234, 229), (128, 205, 193), (53, 151, 143), (1, 102, 94)],
1928 'bugn3': [(229, 245, 249), (153, 216, 201), (44, 162, 95)],
1929 'bugn4': [(237, 248, 251), (178, 226, 226), (102, 194, 164), (35, 139, 69)],
1930 'bugn5': [(237, 248, 251), (178, 226, 226), (102, 194, 164), (44, 162, 95), (0, 109, 44)],
1931 'bugn6': [(237, 248, 251), (204, 236, 230), (153, 216, 201), (102, 194, 164), (44, 162, 95), (0, 109, 44)],
1932 'bugn7': [(237, 248, 251), (204, 236, 230), (153, 216, 201), (102, 194, 164), (65, 174, 118), (35, 139, 69), (0, 88, 36)],
1933 'bugn8': [(247, 252, 253), (229, 245, 249), (204, 236, 230), (153, 216, 201), (102, 194, 164), (65, 174, 118), (35, 139, 69), (0, 88, 36)],
1934 'bugn9': [(247, 252, 253), (229, 245, 249), (204, 236, 230), (153, 216, 201), (102, 194, 164), (65, 174, 118), (35, 139, 69), (0, 109, 44), (0, 68, 27)],
1935 'bupu3': [(224, 236, 244), (158, 188, 218), (136, 86, 167)],
1936 'bupu4': [(237, 248, 251), (179, 205, 227), (140, 150, 198), (136, 65, 157)],
1937 'bupu5': [(237, 248, 251), (179, 205, 227), (140, 150, 198), (136, 86, 167), (129, 15, 124)],
1938 'bupu6': [(237, 248, 251), (191, 211, 230), (158, 188, 218), (140, 150, 198), (136, 86, 167), (129, 15, 124)],
1939 'bupu7': [(237, 248, 251), (191, 211, 230), (158, 188, 218), (140, 150, 198), (140, 107, 177), (136, 65, 157), (110, 1, 107)],
1940 'bupu8': [(247, 252, 253), (224, 236, 244), (191, 211, 230), (158, 188, 218), (140, 150, 198), (140, 107, 177), (136, 65, 157), (110, 1, 107)],
1941 'bupu9': [(247, 252, 253), (224, 236, 244), (191, 211, 230), (158, 188, 218), (140, 150, 198), (140, 107, 177), (136, 65, 157), (129, 15, 124), (77, 0, 75)],
1942 'dark23': [(27, 158, 119), (217, 95, 2), (117, 112, 179)],
1943 'dark24': [(27, 158, 119), (217, 95, 2), (117, 112, 179), (231, 41, 138)],
1944 'dark25': [(27, 158, 119), (217, 95, 2), (117, 112, 179), (231, 41, 138), (102, 166, 30)],
1945 'dark26': [(27, 158, 119), (217, 95, 2), (117, 112, 179), (231, 41, 138), (102, 166, 30), (230, 171, 2)],
1946 'dark27': [(27, 158, 119), (217, 95, 2), (117, 112, 179), (231, 41, 138), (102, 166, 30), (230, 171, 2), (166, 118, 29)],
1947 'dark28': [(27, 158, 119), (217, 95, 2), (117, 112, 179), (231, 41, 138), (102, 166, 30), (230, 171, 2), (166, 118, 29), (102, 102, 102)],
1948 'gnbu3': [(224, 243, 219), (168, 221, 181), (67, 162, 202)],
1949 'gnbu4': [(240, 249, 232), (186, 228, 188), (123, 204, 196), (43, 140, 190)],
1950 'gnbu5': [(240, 249, 232), (186, 228, 188), (123, 204, 196), (67, 162, 202), (8, 104, 172)],
1951 'gnbu6': [(240, 249, 232), (204, 235, 197), (168, 221, 181), (123, 204, 196), (67, 162, 202), (8, 104, 172)],
1952 'gnbu7': [(240, 249, 232), (204, 235, 197), (168, 221, 181), (123, 204, 196), (78, 179, 211), (43, 140, 190), (8, 88, 158)],
1953 'gnbu8': [(247, 252, 240), (224, 243, 219), (204, 235, 197), (168, 221, 181), (123, 204, 196), (78, 179, 211), (43, 140, 190), (8, 88, 158)],
1954 'gnbu9': [(247, 252, 240), (224, 243, 219), (204, 235, 197), (168, 221, 181), (123, 204, 196), (78, 179, 211), (43, 140, 190), (8, 104, 172), (8, 64, 129)],
1955 'greens3': [(229, 245, 224), (161, 217, 155), (49, 163, 84)],
1956 'greens4': [(237, 248, 233), (186, 228, 179), (116, 196, 118), (35, 139, 69)],
1957 'greens5': [(237, 248, 233), (186, 228, 179), (116, 196, 118), (49, 163, 84), (0, 109, 44)],
1958 'greens6': [(237, 248, 233), (199, 233, 192), (161, 217, 155), (116, 196, 118), (49, 163, 84), (0, 109, 44)],
1959 'greens7': [(237, 248, 233), (199, 233, 192), (161, 217, 155), (116, 196, 118), (65, 171, 93), (35, 139, 69), (0, 90, 50)],
1960 'greens8': [(247, 252, 245), (229, 245, 224), (199, 233, 192), (161, 217, 155), (116, 196, 118), (65, 171, 93), (35, 139, 69), (0, 90, 50)],
1961 'greens9': [(247, 252, 245), (229, 245, 224), (199, 233, 192), (161, 217, 155), (116, 196, 118), (65, 171, 93), (35, 139, 69), (0, 109, 44), (0, 68, 27)],
1962 'greys3': [(240, 240, 240), (189, 189, 189), (99, 99, 99)],
1963 'greys4': [(247, 247, 247), (204, 204, 204), (150, 150, 150), (82, 82, 82)],
1964 'greys5': [(247, 247, 247), (204, 204, 204), (150, 150, 150), (99, 99, 99), (37, 37, 37)],
1965 'greys6': [(247, 247, 247), (217, 217, 217), (189, 189, 189), (150, 150, 150), (99, 99, 99), (37, 37, 37)],
1966 'greys7': [(247, 247, 247), (217, 217, 217), (189, 189, 189), (150, 150, 150), (115, 115, 115), (82, 82, 82), (37, 37, 37)],
1967 'greys8': [(255, 255, 255), (240, 240, 240), (217, 217, 217), (189, 189, 189), (150, 150, 150), (115, 115, 115), (82, 82, 82), (37, 37, 37)],
1968 'greys9': [(255, 255, 255), (240, 240, 240), (217, 217, 217), (189, 189, 189), (150, 150, 150), (115, 115, 115), (82, 82, 82), (37, 37, 37), (0, 0, 0)],
1969 'oranges3': [(254, 230, 206), (253, 174, 107), (230, 85, 13)],
1970 'oranges4': [(254, 237, 222), (253, 190, 133), (253, 141, 60), (217, 71, 1)],
1971 'oranges5': [(254, 237, 222), (253, 190, 133), (253, 141, 60), (230, 85, 13), (166, 54, 3)],
1972 'oranges6': [(254, 237, 222), (253, 208, 162), (253, 174, 107), (253, 141, 60), (230, 85, 13), (166, 54, 3)],
1973 'oranges7': [(254, 237, 222), (253, 208, 162), (253, 174, 107), (253, 141, 60), (241, 105, 19), (217, 72, 1), (140, 45, 4)],
1974 'oranges8': [(255, 245, 235), (254, 230, 206), (253, 208, 162), (253, 174, 107), (253, 141, 60), (241, 105, 19), (217, 72, 1), (140, 45, 4)],
1975 'oranges9': [(255, 245, 235), (254, 230, 206), (253, 208, 162), (253, 174, 107), (253, 141, 60), (241, 105, 19), (217, 72, 1), (166, 54, 3), (127, 39, 4)],
1976 'orrd3': [(254, 232, 200), (253, 187, 132), (227, 74, 51)],
1977 'orrd4': [(254, 240, 217), (253, 204, 138), (252, 141, 89), (215, 48, 31)],
1978 'orrd5': [(254, 240, 217), (253, 204, 138), (252, 141, 89), (227, 74, 51), (179, 0, 0)],
1979 'orrd6': [(254, 240, 217), (253, 212, 158), (253, 187, 132), (252, 141, 89), (227, 74, 51), (179, 0, 0)],
1980 'orrd7': [(254, 240, 217), (253, 212, 158), (253, 187, 132), (252, 141, 89), (239, 101, 72), (215, 48, 31), (153, 0, 0)],
1981 'orrd8': [(255, 247, 236), (254, 232, 200), (253, 212, 158), (253, 187, 132), (252, 141, 89), (239, 101, 72), (215, 48, 31), (153, 0, 0)],
1982 'orrd9': [(255, 247, 236), (254, 232, 200), (253, 212, 158), (253, 187, 132), (252, 141, 89), (239, 101, 72), (215, 48, 31), (179, 0, 0), (127, 0, 0)],
1983 'paired10': [(166, 206, 227), (106, 61, 154), (31, 120, 180), (178, 223, 138), (51, 160, 44), (251, 154, 153), (227, 26, 28), (253, 191, 111), (255, 127, 0), (202, 178, 214)],
1984 'paired11': [(166, 206, 227), (106, 61, 154), (255, 255, 153), (31, 120, 180), (178, 223, 138), (51, 160, 44), (251, 154, 153), (227, 26, 28), (253, 191, 111), (255, 127, 0), (202, 178, 214)],
1985 'paired12': [(166, 206, 227), (106, 61, 154), (255, 255, 153), (177, 89, 40), (31, 120, 180), (178, 223, 138), (51, 160, 44), (251, 154, 153), (227, 26, 28), (253, 191, 111), (255, 127, 0), (202, 178, 214)],
1986 'paired3': [(166, 206, 227), (31, 120, 180), (178, 223, 138)],
1987 'paired4': [(166, 206, 227), (31, 120, 180), (178, 223, 138), (51, 160, 44)],
1988 'paired5': [(166, 206, 227), (31, 120, 180), (178, 223, 138), (51, 160, 44), (251, 154, 153)],
1989 'paired6': [(166, 206, 227), (31, 120, 180), (178, 223, 138), (51, 160, 44), (251, 154, 153), (227, 26, 28)],
1990 'paired7': [(166, 206, 227), (31, 120, 180), (178, 223, 138), (51, 160, 44), (251, 154, 153), (227, 26, 28), (253, 191, 111)],
1991 'paired8': [(166, 206, 227), (31, 120, 180), (178, 223, 138), (51, 160, 44), (251, 154, 153), (227, 26, 28), (253, 191, 111), (255, 127, 0)],
1992 'paired9': [(166, 206, 227), (31, 120, 180), (178, 223, 138), (51, 160, 44), (251, 154, 153), (227, 26, 28), (253, 191, 111), (255, 127, 0), (202, 178, 214)],
1993 'pastel13': [(251, 180, 174), (179, 205, 227), (204, 235, 197)],
1994 'pastel14': [(251, 180, 174), (179, 205, 227), (204, 235, 197), (222, 203, 228)],
1995 'pastel15': [(251, 180, 174), (179, 205, 227), (204, 235, 197), (222, 203, 228), (254, 217, 166)],
1996 'pastel16': [(251, 180, 174), (179, 205, 227), (204, 235, 197), (222, 203, 228), (254, 217, 166), (255, 255, 204)],
1997 'pastel17': [(251, 180, 174), (179, 205, 227), (204, 235, 197), (222, 203, 228), (254, 217, 166), (255, 255, 204), (229, 216, 189)],
1998 'pastel18': [(251, 180, 174), (179, 205, 227), (204, 235, 197), (222, 203, 228), (254, 217, 166), (255, 255, 204), (229, 216, 189), (253, 218, 236)],
1999 'pastel19': [(251, 180, 174), (179, 205, 227), (204, 235, 197), (222, 203, 228), (254, 217, 166), (255, 255, 204), (229, 216, 189), (253, 218, 236), (242, 242, 242)],
2000 'pastel23': [(179, 226, 205), (253, 205, 172), (203, 213, 232)],
2001 'pastel24': [(179, 226, 205), (253, 205, 172), (203, 213, 232), (244, 202, 228)],
2002 'pastel25': [(179, 226, 205), (253, 205, 172), (203, 213, 232), (244, 202, 228), (230, 245, 201)],
2003 'pastel26': [(179, 226, 205), (253, 205, 172), (203, 213, 232), (244, 202, 228), (230, 245, 201), (255, 242, 174)],
2004 'pastel27': [(179, 226, 205), (253, 205, 172), (203, 213, 232), (244, 202, 228), (230, 245, 201), (255, 242, 174), (241, 226, 204)],
2005 'pastel28': [(179, 226, 205), (253, 205, 172), (203, 213, 232), (244, 202, 228), (230, 245, 201), (255, 242, 174), (241, 226, 204), (204, 204, 204)],
2006 'piyg10': [(142, 1, 82), (39, 100, 25), (197, 27, 125), (222, 119, 174), (241, 182, 218), (253, 224, 239), (230, 245, 208), (184, 225, 134), (127, 188, 65), (77, 146, 33)],
2007 'piyg11': [(142, 1, 82), (77, 146, 33), (39, 100, 25), (197, 27, 125), (222, 119, 174), (241, 182, 218), (253, 224, 239), (247, 247, 247), (230, 245, 208), (184, 225, 134), (127, 188, 65)],
2008 'piyg3': [(233, 163, 201), (247, 247, 247), (161, 215, 106)],
2009 'piyg4': [(208, 28, 139), (241, 182, 218), (184, 225, 134), (77, 172, 38)],
2010 'piyg5': [(208, 28, 139), (241, 182, 218), (247, 247, 247), (184, 225, 134), (77, 172, 38)],
2011 'piyg6': [(197, 27, 125), (233, 163, 201), (253, 224, 239), (230, 245, 208), (161, 215, 106), (77, 146, 33)],
2012 'piyg7': [(197, 27, 125), (233, 163, 201), (253, 224, 239), (247, 247, 247), (230, 245, 208), (161, 215, 106), (77, 146, 33)],
2013 'piyg8': [(197, 27, 125), (222, 119, 174), (241, 182, 218), (253, 224, 239), (230, 245, 208), (184, 225, 134), (127, 188, 65), (77, 146, 33)],
2014 'piyg9': [(197, 27, 125), (222, 119, 174), (241, 182, 218), (253, 224, 239), (247, 247, 247), (230, 245, 208), (184, 225, 134), (127, 188, 65), (77, 146, 33)],
2015 'prgn10': [(64, 0, 75), (0, 68, 27), (118, 42, 131), (153, 112, 171), (194, 165, 207), (231, 212, 232), (217, 240, 211), (166, 219, 160), (90, 174, 97), (27, 120, 55)],
2016 'prgn11': [(64, 0, 75), (27, 120, 55), (0, 68, 27), (118, 42, 131), (153, 112, 171), (194, 165, 207), (231, 212, 232), (247, 247, 247), (217, 240, 211), (166, 219, 160), (90, 174, 97)],
2017 'prgn3': [(175, 141, 195), (247, 247, 247), (127, 191, 123)],
2018 'prgn4': [(123, 50, 148), (194, 165, 207), (166, 219, 160), (0, 136, 55)],
2019 'prgn5': [(123, 50, 148), (194, 165, 207), (247, 247, 247), (166, 219, 160), (0, 136, 55)],
2020 'prgn6': [(118, 42, 131), (175, 141, 195), (231, 212, 232), (217, 240, 211), (127, 191, 123), (27, 120, 55)],
2021 'prgn7': [(118, 42, 131), (175, 141, 195), (231, 212, 232), (247, 247, 247), (217, 240, 211), (127, 191, 123), (27, 120, 55)],
2022 'prgn8': [(118, 42, 131), (153, 112, 171), (194, 165, 207), (231, 212, 232), (217, 240, 211), (166, 219, 160), (90, 174, 97), (27, 120, 55)],
2023 'prgn9': [(118, 42, 131), (153, 112, 171), (194, 165, 207), (231, 212, 232), (247, 247, 247), (217, 240, 211), (166, 219, 160), (90, 174, 97), (27, 120, 55)],
2024 'pubu3': [(236, 231, 242), (166, 189, 219), (43, 140, 190)],
2025 'pubu4': [(241, 238, 246), (189, 201, 225), (116, 169, 207), (5, 112, 176)],
2026 'pubu5': [(241, 238, 246), (189, 201, 225), (116, 169, 207), (43, 140, 190), (4, 90, 141)],
2027 'pubu6': [(241, 238, 246), (208, 209, 230), (166, 189, 219), (116, 169, 207), (43, 140, 190), (4, 90, 141)],
2028 'pubu7': [(241, 238, 246), (208, 209, 230), (166, 189, 219), (116, 169, 207), (54, 144, 192), (5, 112, 176), (3, 78, 123)],
2029 'pubu8': [(255, 247, 251), (236, 231, 242), (208, 209, 230), (166, 189, 219), (116, 169, 207), (54, 144, 192), (5, 112, 176), (3, 78, 123)],
2030 'pubu9': [(255, 247, 251), (236, 231, 242), (208, 209, 230), (166, 189, 219), (116, 169, 207), (54, 144, 192), (5, 112, 176), (4, 90, 141), (2, 56, 88)],
2031 'pubugn3': [(236, 226, 240), (166, 189, 219), (28, 144, 153)],
2032 'pubugn4': [(246, 239, 247), (189, 201, 225), (103, 169, 207), (2, 129, 138)],
2033 'pubugn5': [(246, 239, 247), (189, 201, 225), (103, 169, 207), (28, 144, 153), (1, 108, 89)],
2034 'pubugn6': [(246, 239, 247), (208, 209, 230), (166, 189, 219), (103, 169, 207), (28, 144, 153), (1, 108, 89)],
2035 'pubugn7': [(246, 239, 247), (208, 209, 230), (166, 189, 219), (103, 169, 207), (54, 144, 192), (2, 129, 138), (1, 100, 80)],
2036 'pubugn8': [(255, 247, 251), (236, 226, 240), (208, 209, 230), (166, 189, 219), (103, 169, 207), (54, 144, 192), (2, 129, 138), (1, 100, 80)],
2037 'pubugn9': [(255, 247, 251), (236, 226, 240), (208, 209, 230), (166, 189, 219), (103, 169, 207), (54, 144, 192), (2, 129, 138), (1, 108, 89), (1, 70, 54)],
2038 'puor10': [(127, 59, 8), (45, 0, 75), (179, 88, 6), (224, 130, 20), (253, 184, 99), (254, 224, 182), (216, 218, 235), (178, 171, 210), (128, 115, 172), (84, 39, 136)],
2039 'puor11': [(127, 59, 8), (84, 39, 136), (45, 0, 75), (179, 88, 6), (224, 130, 20), (253, 184, 99), (254, 224, 182), (247, 247, 247), (216, 218, 235), (178, 171, 210), (128, 115, 172)],
2040 'puor3': [(241, 163, 64), (247, 247, 247), (153, 142, 195)],
2041 'puor4': [(230, 97, 1), (253, 184, 99), (178, 171, 210), (94, 60, 153)],
2042 'puor5': [(230, 97, 1), (253, 184, 99), (247, 247, 247), (178, 171, 210), (94, 60, 153)],
2043 'puor6': [(179, 88, 6), (241, 163, 64), (254, 224, 182), (216, 218, 235), (153, 142, 195), (84, 39, 136)],
2044 'puor7': [(179, 88, 6), (241, 163, 64), (254, 224, 182), (247, 247, 247), (216, 218, 235), (153, 142, 195), (84, 39, 136)],
2045 'puor8': [(179, 88, 6), (224, 130, 20), (253, 184, 99), (254, 224, 182), (216, 218, 235), (178, 171, 210), (128, 115, 172), (84, 39, 136)],
2046 'puor9': [(179, 88, 6), (224, 130, 20), (253, 184, 99), (254, 224, 182), (247, 247, 247), (216, 218, 235), (178, 171, 210), (128, 115, 172), (84, 39, 136)],
2047 'purd3': [(231, 225, 239), (201, 148, 199), (221, 28, 119)],
2048 'purd4': [(241, 238, 246), (215, 181, 216), (223, 101, 176), (206, 18, 86)],
2049 'purd5': [(241, 238, 246), (215, 181, 216), (223, 101, 176), (221, 28, 119), (152, 0, 67)],
2050 'purd6': [(241, 238, 246), (212, 185, 218), (201, 148, 199), (223, 101, 176), (221, 28, 119), (152, 0, 67)],
2051 'purd7': [(241, 238, 246), (212, 185, 218), (201, 148, 199), (223, 101, 176), (231, 41, 138), (206, 18, 86), (145, 0, 63)],
2052 'purd8': [(247, 244, 249), (231, 225, 239), (212, 185, 218), (201, 148, 199), (223, 101, 176), (231, 41, 138), (206, 18, 86), (145, 0, 63)],
2053 'purd9': [(247, 244, 249), (231, 225, 239), (212, 185, 218), (201, 148, 199), (223, 101, 176), (231, 41, 138), (206, 18, 86), (152, 0, 67), (103, 0, 31)],
2054 'purples3': [(239, 237, 245), (188, 189, 220), (117, 107, 177)],
2055 'purples4': [(242, 240, 247), (203, 201, 226), (158, 154, 200), (106, 81, 163)],
2056 'purples5': [(242, 240, 247), (203, 201, 226), (158, 154, 200), (117, 107, 177), (84, 39, 143)],
2057 'purples6': [(242, 240, 247), (218, 218, 235), (188, 189, 220), (158, 154, 200), (117, 107, 177), (84, 39, 143)],
2058 'purples7': [(242, 240, 247), (218, 218, 235), (188, 189, 220), (158, 154, 200), (128, 125, 186), (106, 81, 163), (74, 20, 134)],
2059 'purples8': [(252, 251, 253), (239, 237, 245), (218, 218, 235), (188, 189, 220), (158, 154, 200), (128, 125, 186), (106, 81, 163), (74, 20, 134)],
2060 'purples9': [(252, 251, 253), (239, 237, 245), (218, 218, 235), (188, 189, 220), (158, 154, 200), (128, 125, 186), (106, 81, 163), (84, 39, 143), (63, 0, 125)],
2061 'rdbu10': [(103, 0, 31), (5, 48, 97), (178, 24, 43), (214, 96, 77), (244, 165, 130), (253, 219, 199), (209, 229, 240), (146, 197, 222), (67, 147, 195), (33, 102, 172)],
2062 'rdbu11': [(103, 0, 31), (33, 102, 172), (5, 48, 97), (178, 24, 43), (214, 96, 77), (244, 165, 130), (253, 219, 199), (247, 247, 247), (209, 229, 240), (146, 197, 222), (67, 147, 195)],
2063 'rdbu3': [(239, 138, 98), (247, 247, 247), (103, 169, 207)],
2064 'rdbu4': [(202, 0, 32), (244, 165, 130), (146, 197, 222), (5, 113, 176)],
2065 'rdbu5': [(202, 0, 32), (244, 165, 130), (247, 247, 247), (146, 197, 222), (5, 113, 176)],
2066 'rdbu6': [(178, 24, 43), (239, 138, 98), (253, 219, 199), (209, 229, 240), (103, 169, 207), (33, 102, 172)],
2067 'rdbu7': [(178, 24, 43), (239, 138, 98), (253, 219, 199), (247, 247, 247), (209, 229, 240), (103, 169, 207), (33, 102, 172)],
2068 'rdbu8': [(178, 24, 43), (214, 96, 77), (244, 165, 130), (253, 219, 199), (209, 229, 240), (146, 197, 222), (67, 147, 195), (33, 102, 172)],
2069 'rdbu9': [(178, 24, 43), (214, 96, 77), (244, 165, 130), (253, 219, 199), (247, 247, 247), (209, 229, 240), (146, 197, 222), (67, 147, 195), (33, 102, 172)],
2070 'rdgy10': [(103, 0, 31), (26, 26, 26), (178, 24, 43), (214, 96, 77), (244, 165, 130), (253, 219, 199), (224, 224, 224), (186, 186, 186), (135, 135, 135), (77, 77, 77)],
2071 'rdgy11': [(103, 0, 31), (77, 77, 77), (26, 26, 26), (178, 24, 43), (214, 96, 77), (244, 165, 130), (253, 219, 199), (255, 255, 255), (224, 224, 224), (186, 186, 186), (135, 135, 135)],
2072 'rdgy3': [(239, 138, 98), (255, 255, 255), (153, 153, 153)],
2073 'rdgy4': [(202, 0, 32), (244, 165, 130), (186, 186, 186), (64, 64, 64)],
2074 'rdgy5': [(202, 0, 32), (244, 165, 130), (255, 255, 255), (186, 186, 186), (64, 64, 64)],
2075 'rdgy6': [(178, 24, 43), (239, 138, 98), (253, 219, 199), (224, 224, 224), (153, 153, 153), (77, 77, 77)],
2076 'rdgy7': [(178, 24, 43), (239, 138, 98), (253, 219, 199), (255, 255, 255), (224, 224, 224), (153, 153, 153), (77, 77, 77)],
2077 'rdgy8': [(178, 24, 43), (214, 96, 77), (244, 165, 130), (253, 219, 199), (224, 224, 224), (186, 186, 186), (135, 135, 135), (77, 77, 77)],
2078 'rdgy9': [(178, 24, 43), (214, 96, 77), (244, 165, 130), (253, 219, 199), (255, 255, 255), (224, 224, 224), (186, 186, 186), (135, 135, 135), (77, 77, 77)],
2079 'rdpu3': [(253, 224, 221), (250, 159, 181), (197, 27, 138)],
2080 'rdpu4': [(254, 235, 226), (251, 180, 185), (247, 104, 161), (174, 1, 126)],
2081 'rdpu5': [(254, 235, 226), (251, 180, 185), (247, 104, 161), (197, 27, 138), (122, 1, 119)],
2082 'rdpu6': [(254, 235, 226), (252, 197, 192), (250, 159, 181), (247, 104, 161), (197, 27, 138), (122, 1, 119)],
2083 'rdpu7': [(254, 235, 226), (252, 197, 192), (250, 159, 181), (247, 104, 161), (221, 52, 151), (174, 1, 126), (122, 1, 119)],
2084 'rdpu8': [(255, 247, 243), (253, 224, 221), (252, 197, 192), (250, 159, 181), (247, 104, 161), (221, 52, 151), (174, 1, 126), (122, 1, 119)],
2085 'rdpu9': [(255, 247, 243), (253, 224, 221), (252, 197, 192), (250, 159, 181), (247, 104, 161), (221, 52, 151), (174, 1, 126), (122, 1, 119), (73, 0, 106)],
2086 'rdylbu10': [(165, 0, 38), (49, 54, 149), (215, 48, 39), (244, 109, 67), (253, 174, 97), (254, 224, 144), (224, 243, 248), (171, 217, 233), (116, 173, 209), (69, 117, 180)],
2087 'rdylbu11': [(165, 0, 38), (69, 117, 180), (49, 54, 149), (215, 48, 39), (244, 109, 67), (253, 174, 97), (254, 224, 144), (255, 255, 191), (224, 243, 248), (171, 217, 233), (116, 173, 209)],
2088 'rdylbu3': [(252, 141, 89), (255, 255, 191), (145, 191, 219)],
2089 'rdylbu4': [(215, 25, 28), (253, 174, 97), (171, 217, 233), (44, 123, 182)],
2090 'rdylbu5': [(215, 25, 28), (253, 174, 97), (255, 255, 191), (171, 217, 233), (44, 123, 182)],
2091 'rdylbu6': [(215, 48, 39), (252, 141, 89), (254, 224, 144), (224, 243, 248), (145, 191, 219), (69, 117, 180)],
2092 'rdylbu7': [(215, 48, 39), (252, 141, 89), (254, 224, 144), (255, 255, 191), (224, 243, 248), (145, 191, 219), (69, 117, 180)],
2093 'rdylbu8': [(215, 48, 39), (244, 109, 67), (253, 174, 97), (254, 224, 144), (224, 243, 248), (171, 217, 233), (116, 173, 209), (69, 117, 180)],
2094 'rdylbu9': [(215, 48, 39), (244, 109, 67), (253, 174, 97), (254, 224, 144), (255, 255, 191), (224, 243, 248), (171, 217, 233), (116, 173, 209), (69, 117, 180)],
2095 'rdylgn10': [(165, 0, 38), (0, 104, 55), (215, 48, 39), (244, 109, 67), (253, 174, 97), (254, 224, 139), (217, 239, 139), (166, 217, 106), (102, 189, 99), (26, 152, 80)],
2096 'rdylgn11': [(165, 0, 38), (26, 152, 80), (0, 104, 55), (215, 48, 39), (244, 109, 67), (253, 174, 97), (254, 224, 139), (255, 255, 191), (217, 239, 139), (166, 217, 106), (102, 189, 99)],
2097 'rdylgn3': [(252, 141, 89), (255, 255, 191), (145, 207, 96)],
2098 'rdylgn4': [(215, 25, 28), (253, 174, 97), (166, 217, 106), (26, 150, 65)],
2099 'rdylgn5': [(215, 25, 28), (253, 174, 97), (255, 255, 191), (166, 217, 106), (26, 150, 65)],
2100 'rdylgn6': [(215, 48, 39), (252, 141, 89), (254, 224, 139), (217, 239, 139), (145, 207, 96), (26, 152, 80)],
2101 'rdylgn7': [(215, 48, 39), (252, 141, 89), (254, 224, 139), (255, 255, 191), (217, 239, 139), (145, 207, 96), (26, 152, 80)],
2102 'rdylgn8': [(215, 48, 39), (244, 109, 67), (253, 174, 97), (254, 224, 139), (217, 239, 139), (166, 217, 106), (102, 189, 99), (26, 152, 80)],
2103 'rdylgn9': [(215, 48, 39), (244, 109, 67), (253, 174, 97), (254, 224, 139), (255, 255, 191), (217, 239, 139), (166, 217, 106), (102, 189, 99), (26, 152, 80)],
2104 'reds3': [(254, 224, 210), (252, 146, 114), (222, 45, 38)],
2105 'reds4': [(254, 229, 217), (252, 174, 145), (251, 106, 74), (203, 24, 29)],
2106 'reds5': [(254, 229, 217), (252, 174, 145), (251, 106, 74), (222, 45, 38), (165, 15, 21)],
2107 'reds6': [(254, 229, 217), (252, 187, 161), (252, 146, 114), (251, 106, 74), (222, 45, 38), (165, 15, 21)],
2108 'reds7': [(254, 229, 217), (252, 187, 161), (252, 146, 114), (251, 106, 74), (239, 59, 44), (203, 24, 29), (153, 0, 13)],
2109 'reds8': [(255, 245, 240), (254, 224, 210), (252, 187, 161), (252, 146, 114), (251, 106, 74), (239, 59, 44), (203, 24, 29), (153, 0, 13)],
2110 'reds9': [(255, 245, 240), (254, 224, 210), (252, 187, 161), (252, 146, 114), (251, 106, 74), (239, 59, 44), (203, 24, 29), (165, 15, 21), (103, 0, 13)],
2111 'set13': [(228, 26, 28), (55, 126, 184), (77, 175, 74)],
2112 'set14': [(228, 26, 28), (55, 126, 184), (77, 175, 74), (152, 78, 163)],
2113 'set15': [(228, 26, 28), (55, 126, 184), (77, 175, 74), (152, 78, 163), (255, 127, 0)],
2114 'set16': [(228, 26, 28), (55, 126, 184), (77, 175, 74), (152, 78, 163), (255, 127, 0), (255, 255, 51)],
2115 'set17': [(228, 26, 28), (55, 126, 184), (77, 175, 74), (152, 78, 163), (255, 127, 0), (255, 255, 51), (166, 86, 40)],
2116 'set18': [(228, 26, 28), (55, 126, 184), (77, 175, 74), (152, 78, 163), (255, 127, 0), (255, 255, 51), (166, 86, 40), (247, 129, 191)],
2117 'set19': [(228, 26, 28), (55, 126, 184), (77, 175, 74), (152, 78, 163), (255, 127, 0), (255, 255, 51), (166, 86, 40), (247, 129, 191), (153, 153, 153)],
2118 'set23': [(102, 194, 165), (252, 141, 98), (141, 160, 203)],
2119 'set24': [(102, 194, 165), (252, 141, 98), (141, 160, 203), (231, 138, 195)],
2120 'set25': [(102, 194, 165), (252, 141, 98), (141, 160, 203), (231, 138, 195), (166, 216, 84)],
2121 'set26': [(102, 194, 165), (252, 141, 98), (141, 160, 203), (231, 138, 195), (166, 216, 84), (255, 217, 47)],
2122 'set27': [(102, 194, 165), (252, 141, 98), (141, 160, 203), (231, 138, 195), (166, 216, 84), (255, 217, 47), (229, 196, 148)],
2123 'set28': [(102, 194, 165), (252, 141, 98), (141, 160, 203), (231, 138, 195), (166, 216, 84), (255, 217, 47), (229, 196, 148), (179, 179, 179)],
2124 'set310': [(141, 211, 199), (188, 128, 189), (255, 255, 179), (190, 186, 218), (251, 128, 114), (128, 177, 211), (253, 180, 98), (179, 222, 105), (252, 205, 229), (217, 217, 217)],
2125 'set311': [(141, 211, 199), (188, 128, 189), (204, 235, 197), (255, 255, 179), (190, 186, 218), (251, 128, 114), (128, 177, 211), (253, 180, 98), (179, 222, 105), (252, 205, 229), (217, 217, 217)],
2126 'set312': [(141, 211, 199), (188, 128, 189), (204, 235, 197), (255, 237, 111), (255, 255, 179), (190, 186, 218), (251, 128, 114), (128, 177, 211), (253, 180, 98), (179, 222, 105), (252, 205, 229), (217, 217, 217)],
2127 'set33': [(141, 211, 199), (255, 255, 179), (190, 186, 218)],
2128 'set34': [(141, 211, 199), (255, 255, 179), (190, 186, 218), (251, 128, 114)],
2129 'set35': [(141, 211, 199), (255, 255, 179), (190, 186, 218), (251, 128, 114), (128, 177, 211)],
2130 'set36': [(141, 211, 199), (255, 255, 179), (190, 186, 218), (251, 128, 114), (128, 177, 211), (253, 180, 98)],
2131 'set37': [(141, 211, 199), (255, 255, 179), (190, 186, 218), (251, 128, 114), (128, 177, 211), (253, 180, 98), (179, 222, 105)],
2132 'set38': [(141, 211, 199), (255, 255, 179), (190, 186, 218), (251, 128, 114), (128, 177, 211), (253, 180, 98), (179, 222, 105), (252, 205, 229)],
2133 'set39': [(141, 211, 199), (255, 255, 179), (190, 186, 218), (251, 128, 114), (128, 177, 211), (253, 180, 98), (179, 222, 105), (252, 205, 229), (217, 217, 217)],
2134 'spectral10': [(158, 1, 66), (94, 79, 162), (213, 62, 79), (244, 109, 67), (253, 174, 97), (254, 224, 139), (230, 245, 152), (171, 221, 164), (102, 194, 165), (50, 136, 189)],
2135 'spectral11': [(158, 1, 66), (50, 136, 189), (94, 79, 162), (213, 62, 79), (244, 109, 67), (253, 174, 97), (254, 224, 139), (255, 255, 191), (230, 245, 152), (171, 221, 164), (102, 194, 165)],
2136 'spectral3': [(252, 141, 89), (255, 255, 191), (153, 213, 148)],
2137 'spectral4': [(215, 25, 28), (253, 174, 97), (171, 221, 164), (43, 131, 186)],
2138 'spectral5': [(215, 25, 28), (253, 174, 97), (255, 255, 191), (171, 221, 164), (43, 131, 186)],
2139 'spectral6': [(213, 62, 79), (252, 141, 89), (254, 224, 139), (230, 245, 152), (153, 213, 148), (50, 136, 189)],
2140 'spectral7': [(213, 62, 79), (252, 141, 89), (254, 224, 139), (255, 255, 191), (230, 245, 152), (153, 213, 148), (50, 136, 189)],
2141 'spectral8': [(213, 62, 79), (244, 109, 67), (253, 174, 97), (254, 224, 139), (230, 245, 152), (171, 221, 164), (102, 194, 165), (50, 136, 189)],
2142 'spectral9': [(213, 62, 79), (244, 109, 67), (253, 174, 97), (254, 224, 139), (255, 255, 191), (230, 245, 152), (171, 221, 164), (102, 194, 165), (50, 136, 189)],
2143 'ylgn3': [(247, 252, 185), (173, 221, 142), (49, 163, 84)],
2144 'ylgn4': [(255, 255, 204), (194, 230, 153), (120, 198, 121), (35, 132, 67)],
2145 'ylgn5': [(255, 255, 204), (194, 230, 153), (120, 198, 121), (49, 163, 84), (0, 104, 55)],
2146 'ylgn6': [(255, 255, 204), (217, 240, 163), (173, 221, 142), (120, 198, 121), (49, 163, 84), (0, 104, 55)],
2147 'ylgn7': [(255, 255, 204), (217, 240, 163), (173, 221, 142), (120, 198, 121), (65, 171, 93), (35, 132, 67), (0, 90, 50)],
2148 'ylgn8': [(255, 255, 229), (247, 252, 185), (217, 240, 163), (173, 221, 142), (120, 198, 121), (65, 171, 93), (35, 132, 67), (0, 90, 50)],
2149 'ylgn9': [(255, 255, 229), (247, 252, 185), (217, 240, 163), (173, 221, 142), (120, 198, 121), (65, 171, 93), (35, 132, 67), (0, 104, 55), (0, 69, 41)],
2150 'ylgnbu3': [(237, 248, 177), (127, 205, 187), (44, 127, 184)],
2151 'ylgnbu4': [(255, 255, 204), (161, 218, 180), (65, 182, 196), (34, 94, 168)],
2152 'ylgnbu5': [(255, 255, 204), (161, 218, 180), (65, 182, 196), (44, 127, 184), (37, 52, 148)],
2153 'ylgnbu6': [(255, 255, 204), (199, 233, 180), (127, 205, 187), (65, 182, 196), (44, 127, 184), (37, 52, 148)],
2154 'ylgnbu7': [(255, 255, 204), (199, 233, 180), (127, 205, 187), (65, 182, 196), (29, 145, 192), (34, 94, 168), (12, 44, 132)],
2155 'ylgnbu8': [(255, 255, 217), (237, 248, 177), (199, 233, 180), (127, 205, 187), (65, 182, 196), (29, 145, 192), (34, 94, 168), (12, 44, 132)],
2156 'ylgnbu9': [(255, 255, 217), (237, 248, 177), (199, 233, 180), (127, 205, 187), (65, 182, 196), (29, 145, 192), (34, 94, 168), (37, 52, 148), (8, 29, 88)],
2157 'ylorbr3': [(255, 247, 188), (254, 196, 79), (217, 95, 14)],
2158 'ylorbr4': [(255, 255, 212), (254, 217, 142), (254, 153, 41), (204, 76, 2)],
2159 'ylorbr5': [(255, 255, 212), (254, 217, 142), (254, 153, 41), (217, 95, 14), (153, 52, 4)],
2160 'ylorbr6': [(255, 255, 212), (254, 227, 145), (254, 196, 79), (254, 153, 41), (217, 95, 14), (153, 52, 4)],
2161 'ylorbr7': [(255, 255, 212), (254, 227, 145), (254, 196, 79), (254, 153, 41), (236, 112, 20), (204, 76, 2), (140, 45, 4)],
2162 'ylorbr8': [(255, 255, 229), (255, 247, 188), (254, 227, 145), (254, 196, 79), (254, 153, 41), (236, 112, 20), (204, 76, 2), (140, 45, 4)],
2163 'ylorbr9': [(255, 255, 229), (255, 247, 188), (254, 227, 145), (254, 196, 79), (254, 153, 41), (236, 112, 20), (204, 76, 2), (153, 52, 4), (102, 37, 6)],
2164 'ylorrd3': [(255, 237, 160), (254, 178, 76), (240, 59, 32)],
2165 'ylorrd4': [(255, 255, 178), (254, 204, 92), (253, 141, 60), (227, 26, 28)],
2166 'ylorrd5': [(255, 255, 178), (254, 204, 92), (253, 141, 60), (240, 59, 32), (189, 0, 38)],
2167 'ylorrd6': [(255, 255, 178), (254, 217, 118), (254, 178, 76), (253, 141, 60), (240, 59, 32), (189, 0, 38)],
2168 'ylorrd7': [(255, 255, 178), (254, 217, 118), (254, 178, 76), (253, 141, 60), (252, 78, 42), (227, 26, 28), (177, 0, 38)],
2169 'ylorrd8': [(255, 255, 204), (255, 237, 160), (254, 217, 118), (254, 178, 76), (253, 141, 60), (252, 78, 42), (227, 26, 28), (177, 0, 38)],
2173 if __name__ ==
'__main__':
def handle_text(self, x, y, j, w, t)
def draw(self, cr, highlight=False)
def set_dotcode(self, dotcode, filename='< stdin >', refresh=False)
def __init__(self, item, url, highlight=None)
def on_open(self, action)
def draw(self, cr, highlight=False)
def __init__(self, type, text, line, col)
def on_motion_notify(self, event)
def draw(self, cr, highlight=False)
def handle_font(self, size, name)
def set_filter(self, filter)
def __init__(self, pen, points, filled=False)
def update(self, filename)
def handle_polygon(self, points, filled=False)
def __init__(self, width=1, height=1, shapes=(), nodes=(), edges=(), subgraph_shapes={})
def __init__(self, dot_widget, target_x, target_y)
def parse_node_pos(self, pos)
def __init__(self, dot_widget, target_x, target_y)
def square_distance(x1, y1, x2, y2)
def __init__(self, xdotcode)
def transform(self, x, y)
def drag(self, deltax, deltay)
def draw(self, cr, highlight=False)
def handle_ellipse(self, x0, y0, w, h, filled=False)
def __init__(self, pen, x, y, j, w, t)
def lookup_color(self, c)
def filter(self, type, text)
def handle_color(self, color, filled=False)
def on_button_release(self, event)
def __init__(self, pen, x0, y0, w, h, filled=False)
def handle_line(self, points)
def __init__(self, src, dst, points, shapes, url)
def draw(self, cr, highlight=False)
def handle_graph(self, attrs)
def handle_edge(self, src_id, dst_id, attrs)
def drag(self, deltax, deltay)
def __init__(self, buf=None, pos=0, filename=None, fp=None)
def select_pen(self, highlight)
def draw(self, cr, highlight=False)
def __init__(self, item, x, y, highlight=None, url=None)
def __init__(self, dot_widget)
def parse_edge_pos(self, pos)
def on_reload(self, action)
def handle_graph(self, attrs)
def __init__(self, shapes)
def __init__(self, pen, points, filled=False)
def handle_bezier(self, points, filled=False)
def draw(self, cr, highlight_items=None)
def handle_linewidth(self, linewidth)
def draw(self, cr, highlight=False)
def __init__(self, pen, points)
def __init__(self, msg=None, filename=None, line=None, col=None)
def __init__(self, lexer)
def is_inside(self, x, y)
def drag(self, deltax, deltay)
def handle_linestyle(self, style)
def handle_edge(self, src_id, dst_id, attrs)
def __init__(self, lexer)
def handle_node(self, id, attrs)
def set_xdotcode(self, xdotcode, filename='< stdin >')
def transform(self, x, y)
def drag(self, deltax, deltay)
def on_button_press(self, event)
def __init__(self, x, y, w, h, shapes, url)
def __init__(self, dot_widget)
def handle_node(self, id, attrs)
def open_file(self, filename, refresh=False)
def __init__(self, shapes)
def on_motion_notify(self, event)
def __init__(self, parser, buf)