Fork me on GitHub
#data-science
<
2020-01-18
>
gigasquid00:01:44

Just did a quick example of plotting with numpy and matplotlib/pyplot - interop rocks

❤️ 32
clj 16
🐍 8
Daniel Slutsky20:01:13

@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.

gigasquid20:01:25

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?

gigasquid20:01:41

I’m writing the post now

gigasquid20:01:04

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

Daniel Slutsky21:01:21

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 .File or as a String.

👍 4
Kamuela21:01:23

Nobody says you’d have to own it. Just make it and run haha

🙃 4
gigasquid21:01:10

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

🙏 4
gigasquid21:01:55

trying to get the blog post shipped before I have to go to dinner 🙂

clj 4