Just did a quick example of plotting with numpy and matplotlib/pyplot - interop rocks
https://github.com/gigasquid/libpython-clj-examples/blob/master/src/gigasquid/numpy_plot.clj
@gigasquid that is great. If you consider making the plot wrapper into a library API, then it might be good to consider the different ways one may wish to get the result at. For example: β’ actually opening the plot (as you did) β’ returning an svg string (useful for creating an html report) β’ returning a png file (useful for viewing in the Cider REPL). Here is a short session with variations of your method that return a png http://java.io.File and an svg string.
Cool - Iβm personally not interested in making a library - but Iβm writing a blog post up on it now. I can point people to your improvements if they are interested in making a wrapper. Do you have an idea how to best share it in a blog post. I like the image but itβs hard to get the code out of it?
Iβm writing the post now
To be clear - I hope someone does make a wrapper/ lib π I just know I donβt have the bandwidth to be a good lib owner
Probably at this stage it is more important to write up examples than to try to generalize π. After some more experiments we will hopefully know better about what APIs we may need.
Looking forward to see your next blog post!
I think the examples I wrote would not add anything interesting to the post. π Only wrote them to show that it is sometimes useful go get the result as a <http://java.io|java.io>.File
or as a String
.
Nobody says youβd have to own it. Just make it and run haha
My goal right now is to spread knowledge/ awareness of interop and all the great python libraries that we can use that people may not even be aware of because it is out of our ecosystem
trying to get the blog post shipped before I have to go to dinner π
https://gigasquidsoftware.com/blog/2020/01/18/parens-for-pyplot/