{"id":13439158,"url":"https://github.com/milliams/plotlib","last_synced_at":"2025-05-15T23:04:02.089Z","repository":{"id":18505910,"uuid":"84477764","full_name":"milliams/plotlib","owner":"milliams","description":"Data plotting library for Rust","archived":false,"fork":false,"pushed_at":"2022-12-12T23:02:52.000Z","size":292,"stargazers_count":468,"open_issues_count":22,"forks_count":26,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-05-09T15:53:20.660Z","etag":null,"topics":["boxplot","chart","histogram","line-chart","plot","rust","scatter-plot"],"latest_commit_sha":null,"homepage":"https://plotlib.org","language":"Rust","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/milliams.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-03-09T18:57:13.000Z","updated_at":"2025-05-02T00:27:44.000Z","dependencies_parsed_at":"2023-01-13T19:51:59.508Z","dependency_job_id":null,"html_url":"https://github.com/milliams/plotlib","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milliams%2Fplotlib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milliams%2Fplotlib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milliams%2Fplotlib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milliams%2Fplotlib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/milliams","download_url":"https://codeload.github.com/milliams/plotlib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254436944,"owners_count":22070946,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["boxplot","chart","histogram","line-chart","plot","rust","scatter-plot"],"created_at":"2024-07-31T03:01:11.615Z","updated_at":"2025-05-15T23:04:02.021Z","avatar_url":"https://github.com/milliams.png","language":"Rust","funding_links":[],"categories":["Libraries","Rust","库 Libraries","库"],"sub_categories":["Data visualization","数据可视化 Data visualization","数据可视化"],"readme":"# plotlib\n\n![Rust](https://github.com/milliams/plotlib/workflows/Rust/badge.svg)\n[![codecov](https://codecov.io/gh/milliams/plotlib/branch/master/graph/badge.svg)](https://codecov.io/gh/milliams/plotlib)\n[![Crates.io](https://img.shields.io/crates/v/plotlib.svg)](https://crates.io/crates/plotlib)\n![MIT](https://img.shields.io/crates/l/plotlib.svg)\n[![Documentation](https://docs.rs/plotlib/badge.svg)](https://docs.rs/plotlib)\n\n`plotlib` is a generic data visualisation and plotting library for Rust.\nIt is currently in the very early stages of development.\n\nIt can currently produce:\n\n* histograms\n* scatter plots\n* line graphs from data or from function definitions\n* box plots\n* bar charts\n\nrendering them as either SVG or plain text.\n\nThe API is still very much in flux and is subject to change.\n\nFor example, code like:\n\n```rust\nuse plotlib::page::Page;\nuse plotlib::repr::Plot;\nuse plotlib::view::ContinuousView;\nuse plotlib::style::{PointMarker, PointStyle};\n\nfn main() {\n    // Scatter plots expect a list of pairs\n    let data1 = vec![\n        (-3.0, 2.3),\n        (-1.6, 5.3),\n        (0.3, 0.7),\n        (4.3, -1.4),\n        (6.4, 4.3),\n        (8.5, 3.7),\n    ];\n\n    // We create our scatter plot from the data\n    let s1: Plot = Plot::new(data1).point_style(\n        PointStyle::new()\n            .marker(PointMarker::Square) // setting the marker to be a square\n            .colour(\"#DD3355\"),\n    ); // and a custom colour\n\n    // We can plot multiple data sets in the same view\n    let data2 = vec![(-1.4, 2.5), (7.2, -0.3)];\n    let s2: Plot = Plot::new(data2).point_style(\n        PointStyle::new() // uses the default marker\n            .colour(\"#35C788\"),\n    ); // and a different colour\n\n    // The 'view' describes what set of data is drawn\n    let v = ContinuousView::new()\n        .add(s1)\n        .add(s2)\n        .x_range(-5., 10.)\n        .y_range(-2., 6.)\n        .x_label(\"Some varying variable\")\n        .y_label(\"The response of something\");\n\n    // A page with a single view is then saved to an SVG file\n    Page::single(\u0026v).save(\"scatter.svg\").unwrap();\n}\n\n```\n\nwill produce output like:\n\n![scatter plot](scatter.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilliams%2Fplotlib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmilliams%2Fplotlib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilliams%2Fplotlib/lists"}