https://github.com/tpgillam/plotiter.jl
Make many plots from an iterable
https://github.com/tpgillam/plotiter.jl
julia notebook plotting
Last synced: 3 months ago
JSON representation
Make many plots from an iterable
- Host: GitHub
- URL: https://github.com/tpgillam/plotiter.jl
- Owner: tpgillam
- License: mit
- Archived: true
- Created: 2022-08-09T22:43:13.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-19T10:39:15.000Z (8 months ago)
- Last Synced: 2025-03-31T06:01:36.418Z (3 months ago)
- Topics: julia, notebook, plotting
- Language: Julia
- Homepage:
- Size: 2.35 MB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PlotIter
[](https://tpgillam.github.io/PlotIter.jl/stable/)
[](https://tpgillam.github.io/PlotIter.jl/dev/)
[](https://github.com/tpgillam/PlotIter.jl/actions/workflows/CI.yml?query=branch%3Amain)
[](https://codecov.io/gh/tpgillam/PlotIter.jl)
[](https://github.com/invenia/BlueStyle)
[](https://github.com/SciML/ColPrac)You're in a Jupyter notebook, and have some `things`.
You would like to make a plot based on each `thing`:
```julia
using PlotIter
using Plots# Example data
x = 1.0:0.01:4*pi
things = [
(; title="A", w=1), (; title="B", w=2), (; title="C", w=3),
(; title="D", w=4), (; title="E", w=5),
];# Make some plots!
plot_iter(things; ylims_convex_hull=true) do thing
plot!(x, sin.(x) .* thing.w; title=thing.title)
end;
```
Maybe you would like to ensure color scales match in all of them too:
```julia
plot_iter(
things;
row_height=200,
xlims_convex_hull=true, ylims_convex_hull=true, clims_convex_hull=true,
) do thing
n = 10^(1 + thing.w)
x = randn(Float64, n)
y = randn(Float64, n)
histogram2d!(x .* thing.w, y; title=thing.title, colorbar_scale=:log10)
end;
```
For further usage information, please refer to the [documentation](https://tpgillam.github.io/PlotIter.jl/stable/), and the [example notebook](/examples/example.ipynb).