Draw math formulas with ggplotd

John Colvin via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat Sep 17 08:26:32 PDT 2016


On Saturday, 17 September 2016 at 12:09:04 UTC, Edwin van Leeuwen 
wrote:
> On Saturday, 17 September 2016 at 11:57:17 UTC, John Colvin 
> wrote:
>> On Saturday, 17 September 2016 at 11:45:07 UTC, Edwin van 
>> Leeuwen wrote:
>>> But I assumed he meant adding the formula onto the plot.
>>
>> Hah, yes, I should have read the question better.
>
> Rereading the question I am actually not sure which of us 
> interpreted the question correctly :)
>
>> Do you support embedding outside images? When I wanted nice 
>> mathematical notation generated quickly in D I have used pyd 
>> to call matplotlib's builtin math rendering (much quicker than 
>> a full latex roundtrip).
>
> You can draw onto any cairo surface, so this should be 
> possible. You'd just need to figure out how to cast/convert a 
> matplotlib image to a cairo image.

You just get back an alpha mask as an array of arrays, so it 
should be straightforward from there. What would be useful would 
be integration with ggplotd so it could be placed appropriately. 
Would be even better if e.g. the user could specify a function to 
render text and ggplotd would call it with tick label strings etc.


More information about the Digitalmars-d-learn mailing list