Plot2kill
Plot2kill copied to clipboard
Plot a range of co-ordinates
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.
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));