Plot2kill icon indicating copy to clipboard operation
Plot2kill copied to clipboard

Plot a range of co-ordinates

Open John-Colvin opened this issue 11 years ago • 1 comments

It would be cool if it was possible to plot a range of co-ordinates where the element type was a tuple of x and y.

I can't see any easy way of doing this in Plot2kill currently, although perhaps I've missed it.

John-Colvin avatar Feb 04 '14 13:02 John-Colvin

One easy way to do it (I assume you're talking about a scatter plot) is to use std.algorithm.map. Note: Untested.

alias Tuple!(double, "x", double, "y") Coord; Coord[] coordinates; auto plot = ScatterPlot(map!"a.x"(coordinates), map!"a.y"(coordinates));

dsimcha avatar Jun 14 '14 15:06 dsimcha