igraph-help
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[igraph] using ARGB colors for igraph-0.5.4


From: Manuel Schölling
Subject: [igraph] using ARGB colors for igraph-0.5.4
Date: Fri, 29 Apr 2011 16:54:45 +0200

Hi,

I'd like to use alpha-red-green-blue colors in igraph-0.5.4 using python
under Ubuntu 10.10.

At least according to the R documentation, alpha values are supported,
but when I use the edge color "#10808080" i get this error:

Traceback (most recent call last):
[...]
  File
"/usr/local/lib/python2.6/dist-packages/python_igraph-0.5.4-py2.6-linux-i686.egg/igraph/drawing.py",
 line 765, in plot
    if target is None: result.show()
  File
"/usr/local/lib/python2.6/dist-packages/python_igraph-0.5.4-py2.6-linux-i686.egg/igraph/drawing.py",
 line 399, in show
    if self._is_dirty: self.redraw(ctx)
  File
"/usr/local/lib/python2.6/dist-packages/python_igraph-0.5.4-py2.6-linux-i686.egg/igraph/drawing.py",
 line 346, in redraw
    plotter(ctx, bbox, palette, *args, **kwds)
  File
"/usr/local/lib/python2.6/dist-packages/python_igraph-0.5.4-py2.6-linux-i686.egg/igraph/__init__.py",
 line 1931, in __plot__
    "color", kwds, self.es, config, "black", palette.get)
  File
"/usr/local/lib/python2.6/dist-packages/python_igraph-0.5.4-py2.6-linux-i686.egg/igraph/drawing.py",
 line 838, in collect_attributes
    result = [transform(x) for x in result]
  File
"/usr/local/lib/python2.6/dist-packages/python_igraph-0.5.4-py2.6-linux-i686.egg/igraph/colors.py",
 line 94, in get
    result=color_name_to_rgb(v)
  File
"/usr/local/lib/python2.6/dist-packages/python_igraph-0.5.4-py2.6-linux-i686.egg/igraph/colors.py",
 line 319, in color_name_to_rgb
    return tuple([_clamp(val, 0., 1.) for val in components])
UnboundLocalError: local variable 'components' referenced before
assignment


What do I have to do to make alpha values work?


Cheers,

Manuel




reply via email to

[Prev in Thread] Current Thread [Next in Thread]