MCPcopy Index your code
hub / github.com/JakkuSakura/plotters-gpui

github.com/JakkuSakura/plotters-gpui @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
98 symbols 160 edges 14 files 3 documented · 3%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

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:

# because plotters' font-kit might fail
[patch.crates-io]
pathfinder_simd = { git = "https://github.com/theoparis/pathfinder.git" }
plotters = { git = "https://github.com/JakkuSakura/plotters", tag = "v0.3.7-gpui" }
plotters-backend = { git = "https://github.com/JakkuSakura/plotters", tag = "v0.3.7-gpui" }

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

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 ...

Extension points exported contracts — how you extend this code

PlottersChart (Interface)
(no doc) [10 implementers]
src/element.rs

Core symbols most depended-on inside this repo

coord_to_point
called by 9
src/utils.rs
color
called by 7
src/line.rs
button
called by 7
examples/window.rs
new
called by 7
examples/stock.rs
color_to_hsla
called by 6
src/utils.rs
render_pixels
called by 3
src/line.rs
parse_time
called by 3
examples/stock.rs
add_point
called by 2
src/line.rs

Shape

Method 52
Function 23
Class 22
Interface 1

Languages

Rust100%

Modules by API surface

src/backend.rs11 symbols
examples/animation-cpu.rs10 symbols
src/line.rs9 symbols
examples/3d-plot2.rs9 symbols
examples/stock.rs8 symbols
examples/mandelbrot.rs8 symbols
examples/animation-cosine.rs8 symbols
src/element.rs7 symbols
examples/normal-dist2.rs7 symbols
examples/area-chart.rs7 symbols
examples/3d-plot.rs7 symbols
examples/window.rs5 symbols

For agents

$ claude mcp add plotters-gpui \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact