{"id":16179384,"url":"https://github.com/valb3r/jsimpleplots","last_synced_at":"2026-01-29T20:07:10.932Z","repository":{"id":181969024,"uuid":"667542030","full_name":"valb3r/JSimplePlots","owner":"valb3r","description":"Simple plotting library (facade) for java/kotlin using Jzy3d. Allows to create plots easily","archived":false,"fork":false,"pushed_at":"2024-11-04T07:34:38.000Z","size":678,"stargazers_count":2,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-10T05:39:50.593Z","etag":null,"topics":["chart","charts","java","kotlin","plot"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/valb3r.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-17T18:39:36.000Z","updated_at":"2024-11-04T07:34:41.000Z","dependencies_parsed_at":"2023-07-18T09:31:48.475Z","dependency_job_id":"773d607e-55a3-4c80-b309-88c4a5d49022","html_url":"https://github.com/valb3r/JSimplePlots","commit_stats":{"total_commits":77,"total_committers":1,"mean_commits":77.0,"dds":0.0,"last_synced_commit":"bb139901177b99571e20a8ac0422bd3cf33285eb"},"previous_names":["valb3r/jsimpleplots"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/valb3r/JSimplePlots","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valb3r%2FJSimplePlots","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valb3r%2FJSimplePlots/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valb3r%2FJSimplePlots/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valb3r%2FJSimplePlots/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/valb3r","download_url":"https://codeload.github.com/valb3r/JSimplePlots/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/valb3r%2FJSimplePlots/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28884115,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T19:55:09.949Z","status":"ssl_error","status_checked_at":"2026-01-29T19:55:08.490Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["chart","charts","java","kotlin","plot"],"created_at":"2024-10-10T05:27:38.271Z","updated_at":"2026-01-29T20:07:10.916Z","avatar_url":"https://github.com/valb3r.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![](https://jitpack.io/v/valb3r/JSimplePlots.svg)](https://jitpack.io/#valb3r/JSimplePlots)\n\n# What is this\n\nThis is simple plot helper library that uses [**awesome Jzy3D**](https://github.com/jzy3d/jzy3d-api) for all heavy lifting. The idea is to implement Fluent-API\nthat describes available actions and is short and concise.\n\n\n# Need to draw a plot from IntelliJ using Kotlin (or Java)?\n[![Draw a plot from IntelliJ](https://img.youtube.com/vi/D9aX8-E5eY8/0.jpg)](https://www.youtube.com/watch?v=D9aX8-E5eY8)\n\n\n# Need to draw a plot from terminal?\n\n**(Note: You should have Java and sdkman installed)**\n\n[![Draw a plot from terminal](https://img.youtube.com/vi/X-sY0ijm6JA/0.jpg)](https://www.youtube.com/watch?v=X-sY0ijm6JA)\n\n\n# Usage\n\n## Add library\n\n### Maven\n```xml\n\u003crepositories\u003e\n    \u003crepository\u003e\n        \u003cid\u003ejitpack.io\u003c/id\u003e\n        \u003curl\u003ehttps://jitpack.io\u003c/url\u003e\n    \u003c/repository\u003e\n    \u003crepository\u003e\n        \u003cid\u003emaven.jzy3d.org\u003c/id\u003e\n        \u003curl\u003ehttps://maven.jzy3d.org/releases/\u003c/url\u003e\n    \u003c/repository\u003e\n\u003c/repositories\u003e\n\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.valb3r.JSimplePlots\u003c/groupId\u003e\n    \u003cartifactId\u003eplots\u003c/artifactId\u003e\n    \u003cversion\u003e0.0.13\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n### Gradle\n```groovy\nrepositories {\n    maven { url 'https://jitpack.io' }\n    maven { url 'https://maven.jzy3d.org/releases/' }\n}\n\ndependencies {\n    implementation 'com.github.valb3r.JSimplePlots:plots:0.0.11'\n}\n```\n\n\n# Examples\n\n## Kotlin\n\n## Plot directly from kotlin script:\n(I.e. download `kscript` as described [here](https://github.com/kscripting/kscript), or run it from IntelliJ from file that has `.main.kts` extension, i.e. as [here](examples/kotlin/jumpstart.main.kts))\n\u003c!-- @embed-example-start:jumpstart:kotlin --\u003e\n```kotlin\n@file:Repository(\"https://jitpack.io\")\n@file:Repository(\"https://maven.jzy3d.org/releases/\")\n@file:DependsOn(\"com.github.valb3r.JSimplePlots:plots:0.0.11\")\n\nimport com.valb3r.jsimpleplots.plots.SimplePlots\n\nSimplePlots.xy()\n    .x(floatArrayOf(1.0f, 2.0f, 3.0f, 4.0f))\n    .y(floatArrayOf(1.0f, 4.0f, 9.0f, 16.0f))\n    .width(5)\n    .plot()\n```\n\u003c!-- @embed-example-end --\u003e\n\n## 2D plots\n\n### Line (X-Y)\n![X-Y image](images/xy.jpg)\n\u003c!-- @embed-example-start:example-2d-xy:kotlin --\u003e\n```kotlin\nSimplePlots.xy()\n    .x(floatArrayOf(1.0f, 2.0f, 3.0f, 4.0f))\n    .y(floatArrayOf(1.0f, 4.0f, 9.0f, 16.0f))\n    .plot()\n```\n\u003c!-- @embed-example-end --\u003e\n\n### Multiple plots (X-Y)\n![Multiple plots](images/multiple.jpg)\n\u003c!-- @embed-example-start:example-2d-xy-multiple:kotlin --\u003e\n```kotlin\nval parabola = SimplePlots.xy()\n    .x(floatArrayOf(1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f))\n    .y(floatArrayOf(1.0f, 4.0f, 9.0f, 16.0f, 25.0f, 36.0f))\n    .width(5)\n    .named(\"Parabola\")\nval cubic = SimplePlots.xy()\n    .x(floatArrayOf(1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f))\n    .y(floatArrayOf(1.0f, 8.0f, 27.0f, 64.0f, 125.0f, 216.0f))\n    .width(5)\n    .named(\"Cubic\")\n\nSimplePlots.multiple()\n    .add(parabola)\n    .add(cubic)\n    .plot()\n```\n\u003c!-- @embed-example-end --\u003e\n\n### Dynamic plot (X-Y)\n![X-Y image](images/xy.jpg)\n\u003c!-- @embed-example-start:example-2d-xy-dynamic:kotlin --\u003e\n```kotlin\nval aPlot = xy()\n    .x(floatArrayOf(1.0f, 2.0f, 3.0f, 4.0f))\n    .y(floatArrayOf(1.0f, 4.0f, 9.0f, 16.0f))\n    .plot()\n\nfor (i in 0..9) {\n    aPlot.addPt(Math.random() * 10.0, Math.random() * 10.0, true)\n    try { Thread.sleep(1000L) } catch (ignored: InterruptedException) { }\n}\n```\n\u003c!-- @embed-example-end --\u003e\n\n### Fast-Fourier-Transform\n![FFT image](images/fft.jpg)\n\u003c!-- @embed-example-start:example-2d-fft:kotlin --\u003e\n```kotlin\nSimplePlots.fft()\n    .y(data)\n    .samplingFrequency(samplingFrequency)\n    .plot()\n```\n\u003c!-- @embed-example-end --\u003e\n\n### Saving plot to file\n\u003c!-- @embed-example-start:example-2d-xy-screenshot:kotlin --\u003e\n```kotlin\nSimplePlots.xy()\n    .x(floatArrayOf(1.0f, 2.0f, 3.0f, 4.0f))\n    .y(floatArrayOf(1.0f, 4.0f, 9.0f, 16.0f))\n    .screenshot()\n    .saveToFile(File(\"xy.png\"))\n```\n\u003c!-- @embed-example-end --\u003e\n\n\n## 3D plots\n\n### Heatmap\n![Heatmap image](images/heatmap.jpg)\n\u003c!-- @embed-example-start:example-heatmap:kotlin --\u003e\n```kotlin\nSimplePlots.heatmap()\n    .x(floatArrayOf(1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f))\n    .y(floatArrayOf(1.0f, 1.0f, 1.0f, 1.0f, 2.0f, 2.0f, 2.0f, 2.0f, 3.0f, 3.0f, 3.0f, 3.0f, 4.0f, 4.0f, 4.0f, 4.0f))\n    .z(floatArrayOf(0.0f, 1.0f, 2.0f, 3.0f, 0.0f, 1.0f, 2.0f, 3.0f, 0.0f, 1.0f, 2.0f, 3.0f, 0.0f, 1.0f, 2.0f, 3.0f))\n    .plot()\n```\n\u003c!-- @embed-example-end --\u003e\n\n### Surface\n![Surface image](images/surface.jpg)\n\u003c!-- @embed-example-start:example-3d-surface:kotlin --\u003e\n```kotlin\nSimplePlots.surface()\n    .x(floatArrayOf(1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f))\n    .y(floatArrayOf(1.0f, 1.0f, 1.0f, 1.0f, 2.0f, 2.0f, 2.0f, 2.0f, 3.0f, 3.0f, 3.0f, 3.0f, 4.0f, 4.0f, 4.0f, 4.0f))\n    .z(floatArrayOf(1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 3.0f, 3.0f, 1.0f, 1.0f, 3.0f, 3.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f))\n    .plot()\n```\n\u003c!-- @embed-example-end --\u003e\n\n### Fast fourier transform - waterfall (time domain + frequency domain)\n\u003c!-- @embed-example-start:example-fft-heatmap:kotlin --\u003e\n```kotlin\nSimplePlots.waterfallFft()\n    .y(data)\n    .chunkSize(100)\n    .samplingFrequency(samplingFrequency)\n    .plot()\n```\n\u003c!-- @embed-example-end --\u003e\n\n\n## Plot contents of CSV file usage example\n```kotlin\n@file:Repository(\"https://jitpack.io\")\n@file:Repository(\"https://maven.jzy3d.org/releases/\")\n@file:DependsOn(\"com.github.valb3r.JSimplePlots:plots:0.0.11\")\n@file:DependsOn(\"com.github.valb3r.JSimplePlots:data-adapters:0.0.11\")\n\nimport com.valb3r.jsimpleplots.data_adapters.DataAdapter\nimport com.valb3r.jsimpleplots.plots.SimplePlots\nimport java.io.File\n\n\nval tempFile = File.createTempFile(\"plots\", \"data\")\ntempFile.writeText(\n    \"\"\"\n        X;Y\n        1;1\n        2;4\n        3;9\n        4;16\n        5;25\n    \"\"\".trimIndent()\n)\nval csv = DataAdapter.csv().of(tempFile)\nSimplePlots.xy()\n    .x(csv[\"X\"].float())\n    .y(csv[\"Y\"].float())\n    .plot()\n```\n\n## Java\n\n## 2D plots\n\n### Line (X-Y)\n\u003c!-- @embed-example-start:example-2d-xy:java --\u003e\n```java\nSimplePlots.INSTANCE.xy()\n        .x(new float[] {1.0f, 2.0f, 3.0f, 4.0f})\n        .y(new float[] {1.0f, 4.0f, 9.0f, 16.0f})\n        .plot();\n```\n\u003c!-- @embed-example-end --\u003e\n\n### Multiple plots (X-Y)\n\u003c!-- @embed-example-start:example-2d-xy-multiple:java --\u003e\n```java\nvar parabola = SimplePlots.INSTANCE.xy()\n        .x(new float[] {1.0f, 2.0f, 3.0f, 4.0f})\n        .y(new float[] {1.0f, 4.0f, 9.0f, 16.0f})\n        .named(\"Parabola\");\nvar cubic = SimplePlots.INSTANCE.xy()\n        .x(new float[] {1.0f, 2.0f, 3.0f, 4.0f})\n        .y(new float[] {1.0f, 8.0f, 27.0f, 64.0f})\n        .named(\"Cubic\");\n\nSimplePlots.INSTANCE.multiple()\n        .add(parabola)\n        .add(cubic)\n        .plot();\n```\n\u003c!-- @embed-example-end --\u003e\n\n### Dynamic plot (X-Y)\n![X-Y image](images/xy.jpg)\n\u003c!-- @embed-example-start:example-2d-xy-dynamic:java --\u003e\n```java\nvar aPlot = SimplePlots.INSTANCE.xy()\n        .x(new float[] {1.0f, 2.0f, 3.0f, 4.0f})\n        .y(new float[] {1.0f, 4.0f, 9.0f, 16.0f})\n        .plot();\n\nfor (int i = 0; i \u003c 10; i++) {\n    aPlot.addPt(Math.random() * 10.0, Math.random() * 10.0, true);\n    try { Thread.sleep(1000L);} catch (InterruptedException ignored) {}\n}\n```\n\u003c!-- @embed-example-end --\u003e\n\n### Fast fourier transform\n\u003c!-- @embed-example-start:example-2d-fft:java --\u003e\n```java\nSimplePlots.INSTANCE.fft()\n        .samplingFrequency(samplingFrequency)\n        .y(data)\n        .plot();\n```\n\u003c!-- @embed-example-end --\u003e\n\n### Saving plot to file\n\u003c!-- @embed-example-start:example-2d-xy-screenshot:java --\u003e\n```java\nSimplePlots.INSTANCE.xy()\n        .x(new float[] {1.0f, 2.0f, 3.0f, 4.0f})\n        .y(new float[] {1.0f, 4.0f, 9.0f, 16.0f})\n        .screenshot()\n        .saveToFile(new File(\"xy.png\"), \"png\", new Rectangle(500, 500));\n```\n\u003c!-- @embed-example-end --\u003e\n\n## 3D plots\n\n### Heatmap\n\u003c!-- @embed-example-start:example-heatmap:java --\u003e\n```java\nSimplePlots.INSTANCE.heatmap()\n        .x(new float[] {1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f})\n        .y(new float[] {1.0f, 1.0f, 1.0f, 1.0f, 2.0f, 2.0f, 2.0f, 2.0f, 3.0f, 3.0f, 3.0f, 3.0f, 4.0f, 4.0f, 4.0f, 4.0f})\n        .z(new float[] {1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 3.0f, 3.0f, 1.0f, 1.0f, 3.0f, 3.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f})\n        .plot();\n```\n\u003c!-- @embed-example-end --\u003e\n\n### Surface\n\u003c!-- @embed-example-start:example-3d-surface:java --\u003e\n```java\nSimplePlots.INSTANCE.surface()\n        .x(new float[] {1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f, 1.0f, 2.0f, 3.0f, 4.0f})\n        .y(new float[] {1.0f, 1.0f, 1.0f, 1.0f, 2.0f, 2.0f, 2.0f, 2.0f, 3.0f, 3.0f, 3.0f, 3.0f, 4.0f, 4.0f, 4.0f, 4.0f})\n        .z(new float[] {1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 3.0f, 3.0f, 1.0f, 1.0f, 3.0f, 3.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f})\n        .plot();\n```\n\u003c!-- @embed-example-end --\u003e\n\n### Fast fourier transform - waterfall (time domain + frequency domain)\n\u003c!-- @embed-example-start:example-fft-heatmap:java --\u003e\n```java\nSimplePlots.INSTANCE.waterfallFft()\n        .y(data)\n        .chunkSize(100)\n        .samplingFrequency(samplingFrequency)\n        .plot();\n```\n\u003c!-- @embed-example-end --\u003e\n\n\n# FAQ\n\n- **In case of java.awt.HeadlessException**: Add `-Djava.awt.headless=false` to JVM arguments\n![JVM args in IntelliJ](images/jvm-args-idea.jpg)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalb3r%2Fjsimpleplots","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvalb3r%2Fjsimpleplots","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvalb3r%2Fjsimpleplots/lists"}