-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
31 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# # Use with Plots.jl | ||
|
||
using Plots | ||
using ProudPalettes | ||
|
||
# The palettes defined in [`PROUD_PALETTES`](@ref) can be used to set colors in | ||
# [Plots.jl](https://github.com/JuliaPlots/Plots.jl) plots. | ||
# | ||
# For example, | ||
|
||
x = 0:1e-2:2π | ||
plot(x, cos, color = PROUD_PALETTES[:rainbow][1]) | ||
plot!(x, sin, color = PROUD_PALETTES[:rainbow][2]) | ||
|
||
# They can also be used to set the palette for a whole plot. | ||
# This can be simpler than setting colors one plot at a time. | ||
|
||
palette = PROUD_PALETTES[:rainbow] | ||
p = plot(palette = palette) | ||
|
||
for (i, _) in enumerate(palette) | ||
y = @. sin(x) + i - 1 | ||
plot!(x, y, ribbon = 0.4) | ||
end | ||
|
||
p |