Draw math formulas with ggplotd
Edwin van Leeuwen via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Sep 17 04:45:07 PDT 2016
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 .pdf.
>>
>> And I want to draw a math formula in the image generated with
>> ggplotd.
>
> Generate data from those formulas (I like to do this with
> something like iota(0, 10, 0.05).map!(x => sqrt(x) / (1 +
> sin(x)^^2)) and then plot that.
For this part ggplotd does have a helper function:
http://blackedder.github.io/ggplotd/ggplotd/stat.html#statFunction
auto gg = statFunction(x => sqrt(x) / (1 +
sin(x)^^2), 0.0, 10).geomLine().putIn(GGPlotD());
But I assumed he meant adding the formula onto the plot.
More information about the Digitalmars-d-learn
mailing list