I've been trying to change the linestyles in a LineCollection, but without any success...
If I'm using: col = collections.LineCollection(listXY, linewidths=circwdt, colors=circcol, linestyle='solid', label=plabel) it works fine, but anything other than 'solid' gives me an error when the code calls FigureCanvasAgg.draw(self) (it is a wxpython app): Traceback (most recent call last): File "/home/guano/Arbeit/Stout/StereoPanel.py", line 552, in PlotChecked self.stereoCanvas.draw() File "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_wxagg.py", line 59, in draw FigureCanvasAgg.draw(self) File "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_agg.py", line 314, in draw self.figure.draw(self.renderer) File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 46, in draw_wrapper draw(artist, renderer, *kl) File "/usr/lib/pymodules/python2.6/matplotlib/figure.py", line 774, in draw for a in self.axes: a.draw(renderer) File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 46, in draw_wrapper draw(artist, renderer, *kl) File "/usr/lib/pymodules/python2.6/matplotlib/axes.py", line 1721, in draw a.draw(renderer) File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 46, in draw_wrapper draw(artist, renderer, *kl) File "/usr/lib/pymodules/python2.6/matplotlib/legend.py", line 386, in draw self._legend_box.draw(renderer) File "/usr/lib/pymodules/python2.6/matplotlib/offsetbox.py", line 224, in draw c.draw(renderer) File "/usr/lib/pymodules/python2.6/matplotlib/offsetbox.py", line 224, in draw c.draw(renderer) File "/usr/lib/pymodules/python2.6/matplotlib/offsetbox.py", line 224, in draw c.draw(renderer) File "/usr/lib/pymodules/python2.6/matplotlib/offsetbox.py", line 224, in draw c.draw(renderer) File "/usr/lib/pymodules/python2.6/matplotlib/offsetbox.py", line 488, in draw c.draw(renderer) File "/usr/lib/pymodules/python2.6/matplotlib/artist.py", line 46, in draw_wrapper draw(artist, renderer, *kl) File "/usr/lib/pymodules/python2.6/matplotlib/lines.py", line 535, in draw drawFunc(renderer, gc, tpath, affine.frozen()) File "/usr/lib/pymodules/python2.6/matplotlib/lines.py", line 874, in _draw_lines self._lineFunc(renderer, gc, path, trans) File "/usr/lib/pymodules/python2.6/matplotlib/lines.py", line 925, in _draw_dashed renderer.draw_path(gc, path, trans) File "/usr/lib/pymodules/python2.6/matplotlib/backends/backend_agg.py", line 98, in draw _path self._renderer.draw_path(gc, path, transform, rgbFace) TypeError: float() argument must be a string or a number >From the MPL docs, I see that i should be able to use other linestyles: http://matplotlib.sourceforge.net/api/collections_api.html#matplotlib.collections.LineCollection linestyles [ ‘solid’ | ‘dashed’ | ‘dashdot’ | ‘dotted’ ] a string or dash tuple. The dash tuple is: I'm using MPL 0.99.0 in Ubuntu Karmic (9.10) tks -- Prof. Carlos Henrique Grohmann - Geologist D.Sc. Institute of Geosciences - Univ. of São Paulo, Brazil http://www.igc.usp.br/pessoais/guano Linux User #89721 ________________ Can’t stop the signal. ------------------------------------------------------------------------------ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users