{"id":13728403,"url":"https://github.com/stisa/graph","last_synced_at":"2026-03-03T23:03:21.615Z","repository":{"id":80314459,"uuid":"68330614","full_name":"stisa/graph","owner":"stisa","description":"A basic plotting lib in nim","archived":false,"fork":false,"pushed_at":"2020-08-28T10:44:40.000Z","size":816,"stargazers_count":28,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-09T16:19:03.931Z","etag":null,"topics":["graph","nim","plot"],"latest_commit_sha":null,"homepage":"https://stisa.space/graph/theindex.html","language":"Nim","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stisa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-09-15T20:54:38.000Z","updated_at":"2024-10-13T10:46:39.000Z","dependencies_parsed_at":"2024-01-06T12:15:10.723Z","dependency_job_id":null,"html_url":"https://github.com/stisa/graph","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/stisa/graph","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stisa%2Fgraph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stisa%2Fgraph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stisa%2Fgraph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stisa%2Fgraph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stisa","download_url":"https://codeload.github.com/stisa/graph/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stisa%2Fgraph/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30064796,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-03T18:21:05.932Z","status":"ssl_error","status_checked_at":"2026-03-03T18:20:59.341Z","response_time":61,"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":["graph","nim","plot"],"created_at":"2024-08-03T02:00:41.961Z","updated_at":"2026-03-03T23:03:21.599Z","avatar_url":"https://github.com/stisa.png","language":"Nim","funding_links":[],"categories":["👓 Alternatives to the [Electron.js](https://electronjs.org) ⚛","User Interface"],"sub_categories":["Nim","Plotting"],"readme":"Graph\n=====\n\nThis is a basic plotting library, written in [nim](http://nim-lang.org).  \nThe end goal is to have a tiny plotting lib to use with [jupyternim](https://github.com/stisa/jupyternim)  \nOutputs `.png` or `.svg` files, or a string that contains the `png` as binary data or the `svg` as string.\n\nFor what I want to achieve and where I'm at, see [target](notes/target.md)\n\nSome examples are in [examples](examples):\n\n**Note: text labels are WIP, only for svg atm**\n\n### Example \n![current](notes/currentsvg.svg)\n```nim\nimport graph, math, arraymancer\nlet \n  x  = arange(0.0'f64, 10,0.1)\nlet \n  y  = sin(x)\n  y2 = cos(x)\nvar srf = plot(x.data,y.data)\nsrf.plot(x.data, y2.data)\nsrf.grid\n# Save to file\nsrf.saveTo(\"currentpng.png\")\nsrf.saveTo(\"currentsvg.svg\")\n```\n\n## Current structure\n- **graph**: exposes everything ( basic functionality )\n\nInside `graph` there are specific apis:\n- color: exposes various colours and the proc `color(r,g,b,a)`\n- plot: initializing the plot, adding plots\n- surface: the implementation of `Surface` and `Axis`\n- `backend\u003cx\u003e`: handles rendering the plot\n\n## TODO:\n\n* matplotlib defaults\n  - figure size is 6.4x4.8\"\n  - dpi is 100  \n* [target style](notes/target.md)\n* plotProc should lazily evaluate the proc?\n* better integration with Arraymancer (a Concept that matches if .data and [] ?)\n* integrate chroma? (need to contribute blend?)\n* separate drawing layers for the plot and the background/names/etc so that lines aren't overwritten\n* can I use Arraymancer's tensor without blas? Would they work in js?\n* documentation\n* looks like matplotlib does some spline/approximation stuff to get that smooth\n  * nope, checked the svg and it's plain lines =\u003e I need a better line algo\n* distinguish margin and padding\n* calculate max/min y value str len and adjust eg left margin to fit labels\n* svg backend: less strings, more nodes","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstisa%2Fgraph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstisa%2Fgraph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstisa%2Fgraph/lists"}