Hey everyone…first post here, but we may have interacted in some other open-source community before (Python, Julia, R, Streamlit, etc.) ![]()
As part of taking stock of what I actually know as a software developer in the LLM world, I went down the rabbit hole of “How are graphics actually rendered on a computer?” I purposely tried to approach this question from a first-principles exploration, which is why I didn’t want to use JavaScript, tried not to link to Cairo or other C libraries…and the following two packages are what arose from that!
canvas_mojo: a package that focuses on the lower-level pieces of images: how do you draw things at the pixel level, is there a specific number of default shapes to provide, what is the difference between raster (BMP, PNG) and vector graphics. Stuff like that. It does currently link to fontconfig, though that might be removed soon.
In order to validate the feature completeness of canvas_mojo, I then created dataviz_mojo. This is a higher-level, grammar-of-graphics flavored plotting library. At its most basic, there is a Plot object that can be modified in various ways to make a chart, and 40+ “quickplot” type functions for common charts like Bar, Scatter, Pie, and so on.
I wanted to post this now for any feedback, before spending too much more time on it. If this is something that interests you, I’d love any comments, a test-drive of the software and filing GitHub issues that come up, and even actual collaborators.
Currently, the code is heavily Claude-flavored, but I think it’s still pretty reasonable for a human to understand. If not, make a PR of some kind ![]()
Best,
Randy