Skip to content

Latest commit

 

History

History
57 lines (38 loc) · 2.08 KB

README.md

File metadata and controls

57 lines (38 loc) · 2.08 KB

plotters-gpui

GPUI backend for plotters.

Please goto https://github.com/JakkuSakura/plotters-gpui for more information.

Due to gpui not being published on crates.io, you need to add the following to your Cargo.toml:

[dependencies]
plotters-gpui = { git = "https://github.com/JakkuSakura/plotters-gpui" }

If you failed to build on linux due to font-kit, you might need to add the following to your Cargo.toml:

[dependencies]
font-kit = { git = "https://github.com/JakkuSakura/font-kit-patched", features = ["source-fontconfig-dlopen"] }

# this is to sync versions of font-kit
[patch."https://github.com/zed-instustries/font-kit"]
font-kit = { git = "https://github.com/JakkuSakura/font-kit-patched" }

# because plotters' font-kit might fail
[patch.crates-io]
font-kit = { git = "https://github.com/JakkuSakura/font-kit-patched" }

You might be interested in https://github.com/JakkuSakura/gpui-plot, as it provides interactivity and more stuff on top of plotters-gpui

Show cases

image image image image image

Performance

plotters-gpui try to maintain very good performance compared to that in javascript/python, even better than CPU based plotting libraries

Metal Performance HUD

Use the following environment variable to enable Metal Performance HUD:

MTL_HUD_ENABLED=1
Enables the Metal Performance HUD.
MTL_HUD_ENABLED=1 cargo run ...