Skip to content

tpgillam/PlotIter.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PlotIter

Stable Dev Build Status Coverage Code Style: Blue ColPrac: Contributor's Guide on Collaborative Practices for Community Packages

You're in a Jupyter notebook, and have some things.

You would like to make a plot based on each thing:

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;

Example

Maybe you would like to ensure color scales match in all of them too:

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;

Example

For further usage information, please refer to the documentation, and the example notebook.