diff --git a/src/pywws/Plot.py b/src/pywws/Plot.py index f32ec259..4472a551 100755 --- a/src/pywws/Plot.py +++ b/src/pywws/Plot.py @@ -461,9 +461,11 @@ colour ^^^^^^ -Sets the colour of the subplot line or boxes. Any integer value is -accepted. The mapping of colours to numbers is set by gnuplot. Default -value is the previous colour plus one. +Sets the colour of the subplot line or boxes. This can be in any form +that gnuplot accepts, typically a single integer or an rgb specification +such as ``rgb "cyan"`` or ``rgb "FF00FF"``. The mapping of integer +values to colours is set by gnuplot. Default value is an ever +incrementing integer. .. _subplot-title: @@ -909,25 +911,26 @@ def PlotData(self, plot_no, plot, source): subplot.dat.close() # plot data result += u'plot ' - colour = 0 + colour_idx = 0 for subplot_no in range(subplot_count): subplot = subplots[subplot_no] - colour = eval(subplot.subplot.get_value('colour', str(colour+1))) + colour_idx += 1 + colour = subplot.subplot.get_value('colour', str(colour_idx)) style = subplot.subplot.get_value( - 'style', 'smooth unique lc %d lw 1' % (colour)) + 'style', 'smooth unique lc %s lw 1' % (colour)) words = style.split() if len(words) > 1 and words[0] in ('+', 'x', 'line'): - width = int(words[1]) + width = float(words[1]) else: width = 1 if style == 'box': - style = 'lc %d lw 0 with boxes' % (colour) + style = 'lc %s lw 0 with boxes' % (colour) elif words[0] == '+': - style = 'lc %d lw %d pt 1 with points' % (colour, width) + style = 'lc %s lw %g pt 1 with points' % (colour, width) elif words[0] == 'x': - style = 'lc %d lw %d pt 2 with points' % (colour, width) + style = 'lc %s lw %g pt 2 with points' % (colour, width) elif words[0] == 'line': - style = 'smooth unique lc %d lw %d' % (colour, width) + style = 'smooth unique lc %s lw %g' % (colour, width) axes = subplot.subplot.get_value('axes', 'x1y1') title = subplot.subplot.get_value('title', '') result += u' "%s" using 1:2 axes %s %s title "%s"' % ( diff --git a/src/pywws/__init__.py b/src/pywws/__init__.py index 0c4654f4..36ef9f7a 100644 --- a/src/pywws/__init__.py +++ b/src/pywws/__init__.py @@ -1,3 +1,3 @@ -__version__ = '15.11.0.dev1333' -_release = '1333' -_commit = '143ff42' +__version__ = '15.11.0.dev1334' +_release = '1334' +_commit = '54ef79c'