Hi,
In the process of documenting "linestyles" for contour, I noticed that in a lot of places, linestyle can be this dash tuple, which is described in Collection as:
The dash tuple is::
(offset, onoffseq),
where *onoffseq* is an even length tuple of on and off ink
in points.
But for the life of me, I cannot make this work. Can anyone give me a better explanation, or better yet, a working small example (that we could hopefully add to the example directory)?
Thanks,
Ryan
···
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Hi,
In the process of documenting "linestyles" for contour, I noticed that
in a lot of places, linestyle can be this dash tuple, which is described
in Collection as:
The dash tuple is::
(offset, onoffseq),
where *onoffseq* is an even length tuple of on and off ink
in points.
But for the life of me, I cannot make this work. Can anyone give me a
better explanation, or better yet, a working small example (that we
could hopefully add to the example directory)?
examples/pylab_examples/dash_control.py uses custom on/off ink, but
not the offset. In fact, in the Line2D.set_dashes method, I see that
the offset support is reserved for a TODO. So perhaps you should just
fix the docstring to remove the offset language and just include the
on/off sequence for ink
def set_dashes(self, seq):
"""
Set the dash sequence, sequence of dashes with on off ink in
points. If seq is empty or if seq = (None, None), the
linestyle will be set to solid.
ACCEPTS: sequence of on/off ink in points
"""
if seq == (None, None) or len(seq)==0:
self.set_linestyle('-')
else:
self.set_linestyle('--')
self._dashSeq = seq # TODO: offset ignored for now
···
On Thu, Sep 4, 2008 at 3:30 PM, Ryan May <rmay31@...149...> wrote:
Thanks,
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
matplotlib-devel List Signup and Options