-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Documentation for using Maven artifacts #5
Comments
Running
|
Hi Brendan, |
You are right, there are few demos in https://github.com/JetBrains/lets-plot-kotlin/tree/master/demo/jvm-javafx/src/main/kotlin/plotDemo/scripts. Each of them you can run as a normal java app right in IDEA. We didn't have immediate plans to release JVM artifacts mostly because besides Jupyter Kotlin kernel we didn't have other use-cases for JVM-based plots. Are you looking to embed plots into JVM app? We can relatively easily support JFX graphics or, alternatively AWT+Batik. |
JetBrains/lets-plot repo contains Lets-Plot implementation and build scrips to build and publish artifacts like
This repo (lets-plot-kotlin) only contains Kotlin API (or DSL) to Lets-Plot library and uses said artifacts. There is also Python API to the same library: https://pypi.org/project/lets-plot/ |
Please file issues/proposals to the main project - https://github.com/JetBrains/lets-plot |
Just wanted to add a use-case :) I'm interested in the ability to plot within the JVM, so it's exciting to come across this project (via the KotlinConf talk). I currently am working on a small project that uses Kotlin for running simulations, some outputs of which I'm plotting. Adding Jupyter to the mix would make for a clunkier workflow - it really is nice just to create a quick script in IDEA, press run, and have some plots appear a few seconds later... then change some library code and repeat without having to mess around with manual interpreter restarts etc! (Right now we achieve this with a small Kotlin-based DSL that pipes data & commands into a Python interpreter to use matplotlib...) I've used Python + matplotlib for this kind of work a lot in the past. Bringing the plots up visually is great for fast iteration & debugging, but it's also useful that matplotlib can work headless when writing images directly to files... that way you can dump lots of results, e.g. after doing some kind of parameter sweep, and browse later, or include them in a paper. For me, the benefits of the type system, coroutines, and fantastic tooling are already enough to make Kotlin attractive cf. Python + Cython/C++ for this project, despite the sitll-nascent math/stats/etc. libraries. Easy-to-use visualisation tools would make it even more appealing! |
@tpgillam As the use-cases are building up ) I've just added To use this code in your own project you will need to configure another maven repo:
The |
@alshan Thanks very much, this looks great! Afraid I won't have time to check this out properly before Christmas; but will have a play soon I hope. Yes, having a renderer that isn't tied to a GUI would certainly be valuable - I'm guessing the design of lets-plot can support multiple backends already, in principle at least? |
@tpgillam lets-plot has |
Thanks! After some trial and error, I was able to get the demo working in the Gradle Kotlin DSL on JDK 13. These are the essential parts of the
Is it possible to save the plot as an SVG file and is there an example of this somewhere? |
Looks impressive) |
Awesome! Adding that build.gradle.kts in some form to the documentation or an example project would be very helpful (the build.gradle in demo/jvm-javafx is useful but was slightly too minimal to be readily usable for me). |
Hi @breandan et al, I've added this doc: https://github.com/JetBrains/lets-plot-kotlin/blob/master/README_DEV.md and done some improvements in demos etc. In particular, Please, try these new snapshots:
Also I've added export to SVG - see demos in: |
Okay, just curious, thanks. BTW GitHub does not seem to render the generated SVG out of the box. When using the SVG generated by After manually adding the attribute
instead becomes:
Then GitHub is able to render the SVG generated by |
@breandan , thanks for the find. I've included the fix to |
Hi Igor et al., nice work here! Are you planning to support consumers of this API outside a Jupyter notebook? If so, it would be nice to have some documentation on which dependencies are necessary. Based on the build.gradle file, I was able to locate the Bintray artifacts, and noticed you have written some demos, so it looks like a few use cases are already supported. Specifically, it would be nice to have a quick section in the readme for how to configure Maven/Gradle and output plots to a file or JFX window.
Also, what is the difference between this repository and JetBrains/lets-plot, and where is the appropriate place to file issues? Thanks!
The text was updated successfully, but these errors were encountered: