I’m using Plotly.NET through C#. (Edit you can skip to the solution and further questions)
My goal is simply to include latex compiled images as axis titles. This is a very common need for plotting in data analysis or scientific regimes. I found CSharpMath, which does the latex compiling very easily, and using a skiasharp canvas and a couple of lines of manipulation, have a routine to generate the html-wrapped base64 image string from text input.
I thought that would be the hard part, but I can’t very easily or correctly position them at the axis titles. It seems axis Title won’t take html/images. Annotations seem the same. LayoutImage seems to be the best bet, but as far as I can tell I get data-coordinates, which isn’t right, or “paper” coordinates. Paper can work, but the SizeX/SizeY options are integer only, and 1 seems to already resize the image to the size of the full plotly page (for a single plot at least). This can still work, but now it means I need separately prepare an image of the full size of the layout with my axis title images placed within that already. This is possible but it just seems like it’s maybe less work (but probably for someone else I’ll admit, especially since I don’t know F#) and more correct to get LinearAxis.TitleImage as thing. My method can’t adapt to any layout changes that may or already do exist that would change where the Title should be. I think legends are already an example of one probably, and I suspect grid layouts possible.
My particular hope was to use this in general-purpose data plotting, so some hard-coded, works-for-one-situation hack isn’t ideal. Of course C# is the wrong ecosystem for the job, and it seems probably plotly in python has at least latex support, if not images in general. But C# is just a great language, and I was just trying to find something that can generate nice plots. Plotly in particular is nice because it doesn’t require setting up an application framework, and the shareable interactive html output is nice of course. But Scottplot also doesn’t have latex/image axis titles I think, and quick search doesn’t bring up anything for oxyplot either.
Of course I may be missing an existing option too, so all thoughts are welcome.