ggplotd - curve colour

2016-05-07 Thread brocolis via Digitalmars-d-learn
How do I set the color of a curve with ggplotd? Thanks.

Re: ggplotd - curve colour

2016-05-08 Thread brocolis via Digitalmars-d-learn
Is this correct usage? auto gg = GGPlotD().put( geomLine( Aes!(typeof(xs), "x", typeof(ysfit), "y", string, "colour")( xs, ysfit, "red") ) ); The output is a blank png file. Full source: import ggplotd.ggplotd; import ggplotd.geom; import ggplotd.aes; import ggplotd.axes; void main() {

Re: ggplotd - curve colour

2016-05-09 Thread brocolis via Digitalmars-d-learn
On Monday, 9 May 2016 at 06:24:22 UTC, Edwin van Leeuwen wrote: On Monday, 9 May 2016 at 02:29:47 UTC, brocolis wrote: Is this correct usage? auto gg = GGPlotD().put( geomLine( Aes!(typeof(xs), "x", typeof(ysfit), "y", string, "colour")( xs, ysfit, "red") ) ); The output is a blank png file.

Re: Draw math formulas with ggplotd

2016-09-18 Thread brocolis via Digitalmars-d-learn
On Saturday, 17 September 2016 at 11:45:07 UTC, Edwin van Leeuwen wrote: On Saturday, 17 September 2016 at 11:22:04 UTC, John Colvin wrote: On Saturday, 17 September 2016 at 02:41:15 UTC, brocolis wrote: How do I draw math formulas programmatically? I want to do on screen what latex does on

polar coordinates with ggplotd

2016-09-18 Thread brocolis via Digitalmars-d-learn
I've tried this code. import ggplotd.ggplotd; import ggplotd.geom; import ggplotd.aes; import ggplotd.axes; import std.math; auto r(double theta) { return 2 * sin(6*theta); } auto getX(double theta) { return r(theta) * cos(theta); } auto getY(double theta) { return

Re: polar coordinates with ggplotd

2016-09-18 Thread brocolis via Digitalmars-d-learn
On Sunday, 18 September 2016 at 22:07:31 UTC, brocolis wrote: I've tried this code. import ggplotd.ggplotd; import ggplotd.geom; import ggplotd.aes; import ggplotd.axes; import std.math; auto r(double theta) { return 2 * sin(6*theta); } auto getX(double theta) { return

Draw math formulas with ggplotd

2016-09-16 Thread brocolis via Digitalmars-d-learn
How do I draw math formulas programmatically? I want to do on screen what latex does on .pdf. And I want to draw a math formula in the image generated with ggplotd.

Re: polar coordinates with ggplotd

2016-09-19 Thread brocolis via Digitalmars-d-learn
On Monday, 19 September 2016 at 12:34:56 UTC, Edwin van Leeuwen wrote: On Sunday, 18 September 2016 at 22:13:35 UTC, brocolis wrote: Found an error in ys line. Thanks. Does that mean you solved it? Currently there is no special support for other coordinate systems, but I recently added

Separate IP parts

2016-12-09 Thread brocolis via Digitalmars-d-learn
How do I separate IP parts with dlang? I found this very cool trick, with C++: http://stackoverflow.com/a/5328190 std::string ip ="192.168.1.54"; std::stringstream s(ip); int a,b,c,d; //to store the 4 ints char ch; //to temporarily store the '.' s >> a >> ch >> b >> ch >> c >> ch >> d;