Dashed and dotted lines in plot3d

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Dashed and dotted lines in plot3d

Tomassino Ferrauto
Hi all,
        I needed to do a 3D plot with dashed and dotted lines. As I couldn't find a way
of doing this easily (i.e. using mayavi existing functions), I ended up
generating a list of lines to plot using plot3d (one for each dash) or a list of
point to plot using points3d (this is different than using points3d on original
data as generated points have a constant distance along the line while line
data-points don't). However dashed lines take long to plot (as I've said, each
single dash is a different line). Is there a better way to implement this
(perhaps using lower-level APIs)?

        Tomassino Ferrauto

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev

signature.asc (853 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Dashed and dotted lines in plot3d

Gael Varoquaux
On Tue, Feb 16, 2010 at 02:40:45PM +0100, Tomassino Ferrauto wrote:
> Hi all,
> I needed to do a 3D plot with dashed and dotted lines. As I couldn't find a way
> of doing this easily (i.e. using mayavi existing functions), I ended up
> generating a list of lines to plot using plot3d (one for each dash) or a list of
> point to plot using points3d (this is different than using points3d on original
> data as generated points have a constant distance along the line while line
> data-points don't). However dashed lines take long to plot (as I've said, each
> single dash is a different line). Is there a better way to implement this
> (perhaps using lower-level APIs)?

Not that I know, unfortunately. You would have to build the notion of
linear coordinates and use it to impose an alpha colormap. There is
probably a way of doing this in VTK, but I don't know it.

Best,

Gaƫl
_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev